[FFmpeg-devel] [PATCH] merge audio and video bitstream filters option parsing

Benoit Fouet benoit.fouet
Fri Oct 12 14:57:24 CEST 2007


Guillaume LECERF wrote:
> Hi, just a small question :
>
> 2007/10/12, Benoit Fouet <benoit.fouet at purplelabs.com>:
>   
>> +static void opt_bsf(const char *opt, const char *arg)
>>     
> ...
>   
>> -    bsfp= &video_bitstream_filters;
>> +    bsfp= *opt == 'v' ? &video_bitstream_filters : &audio_bitstream_filters;
>>     
> ...
>   
>> -    { "absf", HAS_ARG | OPT_AUDIO | OPT_EXPERT, {(void*)opt_audio_bsf}, "", "bitstream filter" },
>> -    { "vbsf", HAS_ARG | OPT_VIDEO | OPT_EXPERT, {(void*)opt_video_bsf}, "", "bitstream filter" },
>> +    { "absf", OPT_FUNC2 | HAS_ARG | OPT_AUDIO | OPT_EXPERT, {(void*)opt_bsf}, "", "bitstream filter" },
>> +    { "vbsf", OPT_FUNC2 | HAS_ARG | OPT_VIDEO | OPT_EXPERT, {(void*)opt_bsf}, "", "bitstream filter" },
>>     
>
> Doesn't it need "v" as the second default parameter of the opt_bsf()
> function for the vbsf parameter ?
>   

no
if you type: ffmpeg [...] -vbsf foo [...]
opt_bsf() will be called with "vbsf" as the first parameter and "foo" as
the second one

-- 
Ben
Purple Labs S.A.
www.purplelabs.com




More information about the ffmpeg-devel mailing list