diff utils.c @ 6069:3670c9e7ff4d libavcodec

Check for avcodec_open codec parameter == NULL and return error in that case
author reimar
date Tue, 25 Dec 2007 15:36:12 +0000
parents 2f9c17454842
children 75804d49f33b
line wrap: on
line diff
--- a/utils.c	Sun Dec 23 21:01:09 2007 +0000
+++ b/utils.c	Tue Dec 25 15:36:12 2007 +0000
@@ -848,7 +848,7 @@
         goto end;
     }
 
-    if(avctx->codec)
+    if(avctx->codec || !codec)
         goto end;
 
     if (codec->priv_data_size > 0) {