summaryrefslogtreecommitdiff
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-04-01 16:13:24 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-04-01 16:13:24 +0000
commit6e546aaa248e4ff0b173d61c5c4c40ef63b0535f (patch)
tree3470e4e53a3c8e327fe4906ddb30bd06d406a2e7 /libavcodec/utils.c
parentfa1ab872005961c02da7b08600f7f6a9ab127765 (diff)
make AVCodec.init() optional
Originally committed as revision 8589 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 619613f2d2..4539cb945e 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--;