aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-16 01:32:28 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-01-03 18:27:36 +0100
commit8af76473b355a6753e9107cea7ae5c8443a88fd9 (patch)
treec32f7a72349e58913043b8d7ab0623e51336405e
parent7d96f764d6f2bbdb2e0680441ad63d2513bc42fb (diff)
downloadffmpeg-8af76473b355a6753e9107cea7ae5c8443a88fd9.tar.gz
westwooddemux: dont require avio_size() functionality.
Found by reimar Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit e2a16e82b13d5dbf7567a4acf44619057f19eb9d) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/westwood.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/westwood.c b/libavformat/westwood.c
index c46c3ba10e..b803b68aab 100644
--- a/libavformat/westwood.c
+++ b/libavformat/westwood.c
@@ -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;
}