1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

make AVCodec.init() optional

Originally committed as revision 8589 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2007-04-01 16:13:24 +00:00
parent fa1ab87200
commit 6e546aaa24

View File

@ -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--;