changeset 4762:4d346a3ea729 libavcodec

make AVCodec.init() optional
author michael
date Sun, 01 Apr 2007 16:13:24 +0000
parents 4effe3bde31b
children 28f41c99b704
files utils.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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--;