ffmpeg: support ignoring unsupported mapped streams
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
642355712b
commit
a2aff2690b
@ -111,6 +111,7 @@ static int do_psnr = 0;
|
|||||||
static int input_sync;
|
static int input_sync;
|
||||||
static int override_ffserver = 0;
|
static int override_ffserver = 0;
|
||||||
static int input_stream_potentially_available = 0;
|
static int input_stream_potentially_available = 0;
|
||||||
|
static int ignore_unknown_streams = 0;
|
||||||
|
|
||||||
static void uninit_options(OptionsContext *o)
|
static void uninit_options(OptionsContext *o)
|
||||||
{
|
{
|
||||||
@ -2018,8 +2019,10 @@ loop_end:
|
|||||||
case AVMEDIA_TYPE_DATA: ost = new_data_stream (o, oc, src_idx); break;
|
case AVMEDIA_TYPE_DATA: ost = new_data_stream (o, oc, src_idx); break;
|
||||||
case AVMEDIA_TYPE_ATTACHMENT: ost = new_attachment_stream(o, oc, src_idx); break;
|
case AVMEDIA_TYPE_ATTACHMENT: ost = new_attachment_stream(o, oc, src_idx); break;
|
||||||
default:
|
default:
|
||||||
av_log(NULL, AV_LOG_FATAL, "Cannot map stream #%d:%d - unsupported type.\n",
|
av_log(NULL, ignore_unknown_streams ? AV_LOG_FATAL : AV_LOG_WARNING,
|
||||||
|
"Cannot map stream #%d:%d - unsupported type.\n",
|
||||||
map->file_index, map->stream_index);
|
map->file_index, map->stream_index);
|
||||||
|
if (!ignore_unknown_streams)
|
||||||
exit_program(1);
|
exit_program(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2855,6 +2858,8 @@ const OptionDef options[] = {
|
|||||||
"overwrite output files" },
|
"overwrite output files" },
|
||||||
{ "n", OPT_BOOL, { &no_file_overwrite },
|
{ "n", OPT_BOOL, { &no_file_overwrite },
|
||||||
"never overwrite output files" },
|
"never overwrite output files" },
|
||||||
|
{ "ignore_unknown", OPT_BOOL, { &ignore_unknown_streams },
|
||||||
|
"Ignore unknown stream types" },
|
||||||
{ "c", HAS_ARG | OPT_STRING | OPT_SPEC |
|
{ "c", HAS_ARG | OPT_STRING | OPT_SPEC |
|
||||||
OPT_INPUT | OPT_OUTPUT, { .off = OFFSET(codec_names) },
|
OPT_INPUT | OPT_OUTPUT, { .off = OFFSET(codec_names) },
|
||||||
"codec name", "codec" },
|
"codec name", "codec" },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user