]> git.sesse.net Git - ffmpeg/commitdiff
westwooddemux: dont require avio_size() functionality.
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 16 Dec 2011 00:32:28 +0000 (01:32 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 16 Dec 2011 02:25:20 +0000 (03:25 +0100)
Found by reimar

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/westwood.c

index c46c3ba10e024c8b620391162fb93ef7a001a09c..b803b68aaba5402a348a73cec08b673dfa8106e6 100644 (file)
@@ -324,7 +324,7 @@ static int wsvqa_read_packet(AVFormatContext *s,
         chunk_type = AV_RB32(&preamble[0]);
         chunk_size = AV_RB32(&preamble[4]);
 
-        if(chunk_size > filesize){
+        if(filesize>=0 && chunk_size > filesize){
             av_log(s, AV_LOG_ERROR, "Chunk with size %d truncated\n", chunk_size);
             chunk_size= filesize;
         }