@@ -173,18 +173,9 @@ static int read_chunk(AVFormatContext *s)
if (avio_feof(s->pb))
return AVERROR_EOF;
- if (avio_rl32(s->pb) != MKTAG('D','H','A','V') && dhav->last_good_pos < INT64_MAX - 0x8000) {
- dhav->last_good_pos += 0x8000;
- avio_seek(s->pb, dhav->last_good_pos, SEEK_SET);
-
- while (avio_rl32(s->pb) != MKTAG('D','H','A','V')) {
- if (avio_feof(s->pb) || dhav->last_good_pos >= INT64_MAX - 0x8000)
- return AVERROR_EOF;
- dhav->last_good_pos += 0x8000;
- ret = avio_skip(s->pb, 0x8000 - 4);
- if (ret < 0)
- return ret;
- }
+ while (avio_r8(s->pb) != 'D' || avio_r8(s->pb) != 'H' || avio_r8(s->pb) != 'A' || avio_r8(s->pb) != 'V') {
+ if (avio_feof(s->pb))
+ return AVERROR_EOF;
}
start = avio_tell(s->pb) - 4;