[FFmpeg-devel] [PATCH] Remove usage of deprecated av_set_string2() in cmdutils.c, ffserver.c and opt.c

Baptiste Coudurier baptiste.coudurier
Thu Dec 18 23:13:26 CET 2008


Hi Stefano,

Stefano Sabatini wrote:
> On date Wednesday 2008-12-17 01:22:27 +0100, Michael Niedermayer encoded:
>> On Tue, Dec 16, 2008 at 11:02:48PM +0100, Stefano Sabatini wrote:
> [...]
>>>>> Index: ffmpeg/cmdutils.c
>>>>> ===================================================================
>>>>> --- ffmpeg.orig/cmdutils.c	2008-12-16 19:46:39.000000000 +0100
>>>>> +++ ffmpeg/cmdutils.c	2008-12-16 21:19:16.000000000 +0100
>>>>> @@ -176,25 +176,33 @@
>>>>>  
>>>>>  int opt_default(const char *opt, const char *arg){
>>>>>      int type;
>>>>> +    int ret= 0;
>>>>>      const AVOption *o= NULL;
>>>>>      int opt_types[]={AV_OPT_FLAG_VIDEO_PARAM, AV_OPT_FLAG_AUDIO_PARAM, 0, AV_OPT_FLAG_SUBTITLE_PARAM, 0};
>>>>>  
>>>>> -    for(type=0; type<CODEC_TYPE_NB; type++){
>>>>> +    for(type=0; type<CODEC_TYPE_NB && ret>= 0; type++){
>>>>>          const AVOption *o2 = av_find_opt(avctx_opts[0], opt, NULL, opt_types[type], opt_types[type]);
>>>>>          if(o2)
>>>>> -            o = av_set_string2(avctx_opts[type], opt, arg, 1);
>>>>> +            ret = av_set_string3(avctx_opts[type], opt, arg, 1, &o);
>>>>>      }
>>>>> +    if(o && ret < 0)
>>>>> +        goto invalid_arg;
>>>> do these 2 lines hav any effect?
>>> No, and patch updated.
>> ok
> 
> Applied.
> 
> I renamed the subject to attract the attention of Baptiste, opt.c and
> cmdutils.c hunks have been already OKed.

FFserver patch ok if it works. Thanks for bringing my attention :>

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
checking for life_signs in -lkenny... no




More information about the ffmpeg-devel mailing list