changeset 651:6a5ba24b2c6b libavformat

fixing demuxing for short files where the framerate detection failed
author michael
date Sat, 22 Jan 2005 02:30:45 +0000
parents c129846f7f02
children b47948262721
files utils.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/utils.c	Sat Jan 22 01:48:11 2005 +0000
+++ b/utils.c	Sat Jan 22 02:30:45 2005 +0000
@@ -1783,6 +1783,11 @@
         if (ret < 0) {
             /* EOF or error */
             ret = -1; /* we could not have all the codec parameters before EOF */
+            for(i=0;i<ic->nb_streams;i++) {
+                st = ic->streams[i];
+                if (!has_codec_parameters(&st->codec))
+                    break;
+            }
             if ((ic->ctx_flags & AVFMTCTX_NOHEADER) &&
                 i == ic->nb_streams)
                 ret = 0;