]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Make register_avcodec() call avcodec_init().
authorstefano <stefano@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sun, 14 Dec 2008 20:04:00 +0000 (20:04 +0000)
committerstefano <stefano@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sun, 14 Dec 2008 20:04:00 +0000 (20:04 +0000)
This avoids the possibility to use a registered codec without to first
initialize libavcodec, which resulted in an unexpected behaviour.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@16131 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/avcodec.h
libavcodec/utils.c
libavformat/allformats.c

index ffc08f50e688cb9afb1b9cae37ef12d83447db99..048d22584433616f71bcf507fa602c1c9b63cf58 100644 (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, \
index 755af1ac62e4ee2665b948f1bac2e612c207fb2d..713a4c298ac6e5bc197e5c6d4d9fb776d99e747e 100644 (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;
index 986e0f07da9ce2fa8b006b4d27b1f2dfa0522aa3..43243f8062bdc20e8c884e616189fd64a2f3186a 100644 (file)
@@ -50,7 +50,6 @@ void av_register_all(void)
         return;
     initialized = 1;
 
-    avcodec_init();
     avcodec_register_all();
 
     /* (de)muxers */