Browse Source

Make register_avcodec() call avcodec_init().

This avoids the possibility to use a registered codec without first
initializing libavcodec, which resulted in unexpected behavior.

Originally committed as revision 16131 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Stefano Sabatini 16 years ago
parent
commit
7a961a46ba
3 changed files with 2 additions and 2 deletions
  1. +1
    -1
      libavcodec/avcodec.h
  2. +1
    -0
      libavcodec/utils.c
  3. +0
    -1
      libavformat/allformats.c

+ 1
- 1
libavcodec/avcodec.h View File

@@ -31,7 +31,7 @@

#define LIBAVCODEC_VERSION_MAJOR 52
#define LIBAVCODEC_VERSION_MINOR 6
#define LIBAVCODEC_VERSION_MICRO 1
#define LIBAVCODEC_VERSION_MICRO 2

#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \


+ 1
- 0
libavcodec/utils.c View File

@@ -90,6 +90,7 @@ AVCodec *av_codec_next(AVCodec *c){
void register_avcodec(AVCodec *codec)
{
AVCodec **p;
avcodec_init();
p = &first_avcodec;
while (*p != NULL) p = &(*p)->next;
*p = codec;


+ 0
- 1
libavformat/allformats.c View File

@@ -50,7 +50,6 @@ void av_register_all(void)
return;
initialized = 1;

avcodec_init();
avcodec_register_all();

/* (de)muxers */


Loading…
Cancel
Save