-
-
Save rcombs/f7662847a9d8b3e54dc3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c | |
index cbbcb84..d68ba3a 100644 | |
--- a/ffmpeg_opt.c | |
+++ b/ffmpeg_opt.c | |
@@ -115,6 +115,7 @@ static int do_psnr = 0; | |
static int input_sync; | |
static int override_ffserver = 0; | |
static int input_stream_potentially_available = 0; | |
+static int ignore_unknown_streams = 0; | |
static void uninit_options(OptionsContext *o) | |
{ | |
@@ -2083,9 +2084,11 @@ loop_end: | |
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; | |
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); | |
- exit_program(1); | |
+ if (!ignore_unknown_streams) | |
+ exit_program(1); | |
} | |
} | |
} | |
@@ -2920,6 +2923,8 @@ const OptionDef options[] = { | |
"overwrite output files" }, | |
{ "n", OPT_BOOL, { &no_file_overwrite }, | |
"never overwrite output files" }, | |
+ { "ignore_unknown", OPT_BOOL, { &ignore_unknown_streams }, | |
+ "Ignore unknown stream types" }, | |
{ "c", HAS_ARG | OPT_STRING | OPT_SPEC | | |
OPT_INPUT | OPT_OUTPUT, { .off = OFFSET(codec_names) }, | |
"codec name", "codec" }, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment