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

Stefano Sabatini stefano.sabatini-lala
Thu Dec 18 00:27:42 CET 2008


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.

Regards.
-- 
FFmpeg = Fostering and Forgiving Mastering Power Esoteric Geek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: use-av-set-string3.patch
Type: text/x-diff
Size: 1892 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081218/ec169195/attachment.patch>



More information about the ffmpeg-devel mailing list