MCPcopy Create free account
hub / github.com/byhook/ffmpeg4android / opt_streamid

Function opt_streamid

ffmpeg-single-cmd/src/main/cpp/ffmpeg_opt.c:1846–1866  ·  view source on GitHub ↗

arg format is "output-stream-index:streamid-value". */

Source from the content-addressed store, hash-verified

1844
1845/* arg format is "output-stream-index:streamid-value". */
1846static int opt_streamid(void *optctx, const char *opt, const char *arg)
1847{
1848 OptionsContext *o = optctx;
1849 int idx;
1850 char *p;
1851 char idx_str[16];
1852
1853 av_strlcpy(idx_str, arg, sizeof(idx_str));
1854 p = strchr(idx_str, ':');
1855 if (!p) {
1856 av_log(NULL, AV_LOG_FATAL,
1857 "Invalid value '%s' for option '%s', required syntax is 'index:value'\n",
1858 arg, opt);
1859 exit_program(1);
1860 }
1861 *p++ = '\0';
1862 idx = parse_number_or_die(opt, idx_str, OPT_INT, 0, MAX_STREAMS-1);
1863 o->streamid_map = grow_array(o->streamid_map, sizeof(*o->streamid_map), &o->nb_streamid_map, idx+1);
1864 o->streamid_map[idx] = parse_number_or_die(opt, p, OPT_INT, 0, INT_MAX);
1865 return 0;
1866}
1867
1868static int copy_chapters(InputFile *ifile, OutputFile *ofile, int copy_metadata)
1869{

Callers

nothing calls this directly

Calls 3

exit_programFunction · 0.85
parse_number_or_dieFunction · 0.85
grow_arrayFunction · 0.85

Tested by

no test coverage detected