[FFmpeg-cvslog] avformat/electronicarts: fix demuxing of certain eam files
Paul B Mahol
git at videolan.org
Thu Oct 22 11:01:56 CEST 2015
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Thu Oct 22 10:35:09 2015 +0200| [6debfce6a31bf5e5e1aadcf47e0ba6251815a31b] | committer: Paul B Mahol
avformat/electronicarts: fix demuxing of certain eam files
Such files have gaps between header chunks.
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6debfce6a31bf5e5e1aadcf47e0ba6251815a31b
---
libavformat/electronicarts.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c
index 22a7bc5..8087c9f 100644
--- a/libavformat/electronicarts.c
+++ b/libavformat/electronicarts.c
@@ -662,7 +662,19 @@ 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)) {
+ int tag = avio_rl32(pb);
+
+ if (tag == ISNh_TAG ||
+ tag == SCHl_TAG ||
+ tag == SEAD_TAG ||
+ tag == SHEN_TAG) {
+ avio_skip(pb, -4);
+ break;
+ }
+ }
+ if (avio_feof(pb))
+ ret = AVERROR_EOF;
packet_read = 1;
break;
More information about the ffmpeg-cvslog
mailing list