diff utils.c @ 1456:670fca257a69 libavcodec

detect avcodec_open() on an already opened AVCodecContext
author michaelni
date Wed, 10 Sep 2003 08:20:14 +0000
parents c4539ef4d8cb
children 010f76d07a27
line wrap: on
line diff
--- a/utils.c	Tue Sep 09 22:59:16 2003 +0000
+++ b/utils.c	Wed Sep 10 08:20:14 2003 +0000
@@ -305,6 +305,9 @@
 {
     int ret;
 
+    if(avctx->codec)
+        return -1;
+
     avctx->codec = codec;
     avctx->codec_id = codec->id;
     avctx->frame_number = 0;