Browse Source

avformat/electronicarts: fix demuxing of certain eam files

Such files have gaps between header chunks.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
tags/n3.0
Paul B Mahol 10 years ago
parent
commit
6debfce6a3
1 changed files with 13 additions and 1 deletions
  1. +13
    -1
      libavformat/electronicarts.c

+ 13
- 1
libavformat/electronicarts.c View File

@@ -662,7 +662,19 @@ static int ea_read_packet(AVFormatContext *s, AVPacket *pkt)
case SCEl_TAG: case SCEl_TAG:
case SEND_TAG: case SEND_TAG:
case SEEN_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; packet_read = 1;
break; break;




Loading…
Cancel
Save