[FFmpeg-cvslog] r18826 - trunk/libavcodec/opt.c

Ramiro Polla ramiro
Wed May 20 20:56:46 CEST 2009


stefano wrote:
> Author: stefano
> Date: Thu May 14 20:50:58 2009
> New Revision: 18826
> 
> Log:
> Make av_set_string3() print a message in case of unknown option.
> 
> Modified:
>    trunk/libavcodec/opt.c
> 
> Modified: trunk/libavcodec/opt.c
> ==============================================================================
> --- trunk/libavcodec/opt.c	Thu May 14 20:43:43 2009	(r18825)
> +++ trunk/libavcodec/opt.c	Thu May 14 20:50:58 2009	(r18826)
> @@ -112,8 +112,10 @@ int av_set_string3(void *obj, const char
>      const AVOption *o= av_find_opt(obj, name, NULL, 0, 0);
>      if (o_out)
>          *o_out = o;
> -    if(!o)
> +    if(!o) {
> +        av_log(obj, AV_LOG_ERROR, "Unknown option '%s'\n", name);
>          return AVERROR(ENOENT);
> +    }
>      if(!val || o->offset<=0)
>          return AVERROR(EINVAL);

This now prints two errors for -vb & Co. (but it still works):

./ffmpeg_g -i ../input.avi -vb 10M -y output.mpg
FFmpeg version SVN-r18826, Copyright (c) 2000-2009 Fabrice Bellard, et al.
   configuration:  --cc='ccache gcc'
   libavutil     50. 3. 0 / 50. 3. 0
   libavcodec    52.29. 0 / 52.29. 0
   libavformat   52.32. 0 / 52.32. 0
   libavdevice   52. 2. 0 / 52. 2. 0
   libswscale     0. 7. 1 /  0. 7. 1
   built on May 20 2009 15:54:00, gcc: 4.3.3
Input #0, avi, from '../input.avi':
   Duration: 00:00:05.01, start: 0.000000, bitrate: 748 kb/s
     Stream #0.0: Video: mpeg4, yuv420p, 352x288 [PAR 1:1 DAR 11:9], 25 
tbr, 25 tbn, 25 tbc
     Stream #0.1: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
[NULL @ 0x24a54b0]Unknown option 'vb'
[swscaler @ 0x24a64e0]Unknown option 'vb'
Output #0, mpeg, to 'output.mpg':
     Stream #0.0: Video: mpeg1video, yuv420p, 352x288 [PAR 1:1 DAR 
11:9], q=2-31, 10000 kb/s, 90k tbn, 25 tbc
     Stream #0.1: Audio: mp2, 44100 Hz, stereo, s16, 64 kb/s
Stream mapping:
   Stream #0.0 -> #0.0
   Stream #0.1 -> #0.1
Press [q] to stop encoding



More information about the ffmpeg-cvslog mailing list