[FFmpeg-cvslog] avidec: Fix demuxing of non seekable avis with multiple RIFFs
Michael Niedermayer
git at videolan.org
Thu Mar 28 17:34:22 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Mar 28 17:22:35 2013 +0100| [27b7bfc7b5be601be0dd5a2a472be80fc5263bdd] | committer: Michael Niedermayer
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 at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=27b7bfc7b5be601be0dd5a2a472be80fc5263bdd
---
libavformat/avidec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index f6eb71e..3105d33 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##
More information about the ffmpeg-cvslog
mailing list