[SCM] libav/experimental: make AVCodec.init() optional

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:58:26 UTC 2013


The following commit has been merged in the experimental branch:
commit 6e546aaa248e4ff0b173d61c5c4c40ef63b0535f
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Sun Apr 1 16:13:24 2007 +0000

    make AVCodec.init() optional
    
    Originally committed as revision 8589 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 619613f..4539cb9 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -829,12 +829,14 @@ int avcodec_open(AVCodecContext *avctx, AVCodec *codec)
     avctx->codec = codec;
     avctx->codec_id = codec->id;
     avctx->frame_number = 0;
+    if(avctx->codec->init){
     ret = avctx->codec->init(avctx);
     if (ret < 0) {
         av_freep(&avctx->priv_data);
         avctx->codec= NULL;
         goto end;
     }
+    }
     ret=0;
 end:
     entangled_thread_counter--;

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list