summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-03-28 17:22:35 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-03-28 17:30:42 +0100
commit27b7bfc7b5be601be0dd5a2a472be80fc5263bdd (patch)
treee94b842606f674fddefdc10afa6ec0de133fbe3b /libavformat
parent5009863ab5a4db6979eb39ea543d07c212f6b7df (diff)
avidec: Fix demuxing of non seekable avis with multiple RIFFs
This solution uses the size of the first RIFF if its valid to check frame size validity when the filesize could not be determined. Feedback is welcome, other ideas and improvments as well! Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/avidec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index f6eb71ec0f..3105d339ca 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -944,7 +944,7 @@ start_sync:
n= get_stream_idx(d+2);
av_dlog(s, "%X %X %X %X %X %X %X %X %"PRId64" %u %d\n",
d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7], i, size, n);
- if(i + (uint64_t)size > avi->fsize || d[0] > 127)
+ if(i*(avi->io_fsize>0) + (uint64_t)size > avi->fsize || d[0] > 127)
continue;
//parse ix##