Browse code

cmdutils: Exit in case of faulty stream specifiers

Avoids printing confusing and unrelated errors
Fixes Ticket2772

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer authored on 2014/11/17 12:06:32
Showing 1 changed files
... ...
@@ -1997,7 +1997,7 @@ AVDictionary *filter_codec_opts(AVDictionary *opts, enum AVCodecID codec_id,
1997 1997
             switch (check_stream_specifier(s, st, p + 1)) {
1998 1998
             case  1: *p = 0; break;
1999 1999
             case  0:         continue;
2000
-            default:         return NULL;
2000
+            default:         exit_program(1);
2001 2001
             }
2002 2002
 
2003 2003
         if (av_opt_find(&cc, t->key, NULL, flags, AV_OPT_SEARCH_FAKE_OBJ) ||