# HG changeset patch # User michael # Date 1175444004 0 # Node ID 4d346a3ea72948ca8f22a975f8c4cf955b67f8fb # Parent 4effe3bde31b1e017fe70528553e9894a036c9bf make AVCodec.init() optional diff -r 4effe3bde31b -r 4d346a3ea729 utils.c --- a/utils.c Sun Apr 01 14:28:48 2007 +0000 +++ b/utils.c Sun Apr 01 16:13:24 2007 +0000 @@ -829,12 +829,14 @@ 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--;