changeset 2586:1813683cc888 libavformat

Add checking for codecid to has_codec_parameters(). patch by Ronald S. Bultje, rsbultje gmail com Date: Sat, 29 Sep 2007 09:25:52 -0400 Subject: [FFmpeg-devel] [PATCH] has_codec_parameters() addition
author diego
date Mon, 01 Oct 2007 22:11:10 +0000
parents ecd8a9aa182d
children d751acab2622
files utils.c
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/utils.c	Mon Oct 01 19:48:02 2007 +0000
+++ b/utils.c	Mon Oct 01 22:11:10 2007 +0000
@@ -1638,7 +1638,7 @@
         val = 1;
         break;
     }
-    return (val != 0);
+    return (enc->codec_id != CODEC_ID_NONE && val != 0);
 }
 
 static int try_decode_frame(AVStream *st, const uint8_t *data, int size)
@@ -1803,9 +1803,6 @@
                 break;
             if(st->parser && st->parser->parser->split && !st->codec->extradata)
                 break;
-            if (st->codec->codec_type == CODEC_TYPE_AUDIO &&
-                st->codec->codec_id == CODEC_ID_NONE)
-                break;
             if(st->first_dts == AV_NOPTS_VALUE)
                 break;
         }