# HG changeset patch # User michael # Date 1173555059 0 # Node ID 1cbd1d658165ce16a8e6fd625e3df867d10f6eff # Parent 7460077180aa9c18afb66313cecb73d7fdc6e75f fix demuxing of broken MVI_3011.avi diff -r 7460077180aa -r 1cbd1d658165 avidec.c --- 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);