[FFmpeg-devel] [PATCH] avformat/electronicarts: fix demuxing of certain .eam files
Paul B Mahol
onemda at gmail.com
Mon Oct 19 11:35:15 CEST 2015
Such files have empty gaps between chunks.
Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
libavformat/electronicarts.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c
index 5d21d49..c0b6d6e 100644
--- a/libavformat/electronicarts.c
+++ b/libavformat/electronicarts.c
@@ -652,7 +652,14 @@ static int ea_read_packet(AVFormatContext *s, AVPacket *pkt)
case SCEl_TAG:
case SEND_TAG:
case SEEN_TAG:
- ret = AVERROR(EIO);
+ while (!avio_feof(pb)) {
+ if (avio_rl32(pb)) {
+ avio_skip(pb, -4);
+ break;
+ }
+ }
+ if (avio_feof(pb))
+ ret = AVERROR_EOF;
packet_read = 1;
break;
--
1.9.1
More information about the ffmpeg-devel
mailing list