[FFmpeg-devel] [PATCH] Make register_codec() call avcodec_init()

Stefano Sabatini stefano.sabatini-lala
Sun Dec 14 16:08:45 CET 2008


On date Sunday 2008-12-14 02:19:02 +0100, Michael Niedermayer encoded:
> On Sun, Dec 07, 2008 at 08:02:22PM +0100, Stefano Sabatini wrote:
> > Hi all,
> > 
> > I've not a very strong opinion on this, but this way is safer,
> > otherwise we can have an user register and use a codec which won't
> > work. This is also more consistent with the use of av_register_all().
> > 
> > Regards.
> > -- 
> > FFmpeg = Frenzy and Fundamental Minimalistic Puritan Enhancing Gorilla
> 
> > Index: libavcodec/avcodec.h
> > ===================================================================
> > --- libavcodec/avcodec.h	(revision 16030)
> > +++ libavcodec/avcodec.h	(working copy)
> > @@ -31,7 +31,7 @@
> >  
> >  #define LIBAVCODEC_VERSION_MAJOR 52
> >  #define LIBAVCODEC_VERSION_MINOR  6
> > -#define LIBAVCODEC_VERSION_MICRO  0
> > +#define LIBAVCODEC_VERSION_MICRO  1
> >  
> >  #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
> >                                                 LIBAVCODEC_VERSION_MINOR, \
> > @@ -2563,6 +2563,11 @@
> >   */
> >  void avcodec_init(void);
> >  
> > +/**
> > + * Register the codec \p format. Also initialize libavcodec.
> 
> codec format?

I'm attaching a patch which changes "format" to a more explicit "codec".
 
> and iam mostly ok with the patch in principle
> 
> [...]
> > Index: libavformat/allformats.c
> > ===================================================================
> > --- libavformat/allformats.c	(revision 16030)
> > +++ libavformat/allformats.c	(working copy)
> > @@ -47,7 +47,6 @@
> >          return;
> >      initialized = 1;
> >  
> > -    avcodec_init();
> >      avcodec_register_all();
> >  
> 
> please generate patches with svn di -x -p, also dont hesitate to tell
> others who dont, it is occasionally quite usefull

I'll do for the next one, sorry for the following (I still have to
figure out if it's possible to do that with quilt).

Regards.
-- 
FFmpeg = Furious & Forgiving Most Plastic Elastic God
-------------- next part --------------
A non-text attachment was scrubbed...
Name: change-register-avcodec-param-name.patch
Type: text/x-diff
Size: 1069 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081214/60d827f4/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: init-lavc-in-register-codec.patch
Type: text/x-diff
Size: 809 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081214/60d827f4/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: document-register-avcodec.patch
Type: text/x-diff
Size: 444 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081214/60d827f4/attachment-0002.patch>



More information about the ffmpeg-devel mailing list