[FFmpeg-devel] [PATCH 02/11] Check output value of opt_default.

Stefano Sabatini stefano.sabatini-lala
Fri Nov 12 19:31:40 CET 2010


---
 ffmpeg.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index dcad55a..0960515 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2741,7 +2741,8 @@ static int opt_bitrate(const char *opt, const char *arg)
 {
     int codec_type = opt[0]=='a' ? AVMEDIA_TYPE_AUDIO : AVMEDIA_TYPE_VIDEO;
 
-    opt_default(opt, arg);
+    if (opt_default(opt, arg) < 0)
+        ffmpeg_exit(1);
 
     if (av_get_int(avcodec_opts[codec_type], "b", NULL) < 1000)
         fprintf(stderr, "WARNING: The bitrate parameter is set too low. It takes bits/s as argument, not kbits/s\n");
-- 
1.7.1




More information about the ffmpeg-devel mailing list