arg format is "output-stream-index:streamid-value". */
| 1844 | |
| 1845 | /* arg format is "output-stream-index:streamid-value". */ |
| 1846 | static 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 | |
| 1868 | static int copy_chapters(InputFile *ifile, OutputFile *ofile, int copy_metadata) |
| 1869 | { |
nothing calls this directly
no test coverage detected