changeset 1894:1cbd1d658165 libavformat

fix demuxing of broken MVI_3011.avi
author michael
date Sat, 10 Mar 2007 19:30:59 +0000
parents 7460077180aa
children 87148b96d649
files avidec.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/avidec.c	Sat Mar 10 18:39:58 2007 +0000
+++ b/avidec.c	Sat Mar 10 19:30:59 2007 +0000
@@ -503,6 +503,13 @@
             sscanf(str_track, "%d", &s->track);
             break;
         default:
+            if(size > 1000000){
+                av_log(s, AV_LOG_ERROR, "well something went wrong during header parsing, "
+                                        "ill ignore it and try to continue anyway\n");
+                avi->movi_list = url_ftell(pb) - 4;
+                avi->movi_end  = url_fsize(pb);
+                goto end_of_header;
+            }
             /* skip tag */
             size += (size & 1);
             url_fskip(pb, size);