changeset 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 460e5ead6722
files utils.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
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;