Commit 00099ef0 authored by Paul B Mahol's avatar Paul B Mahol

avformat/dsfdec: fix calculation of size of data chunk

Ignore extra 12 bytes that belong to tag and size.
Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 5d3efe9e
...@@ -137,8 +137,8 @@ static int dsf_read_header(AVFormatContext *s) ...@@ -137,8 +137,8 @@ static int dsf_read_header(AVFormatContext *s)
dsf->data_end = avio_tell(pb); dsf->data_end = avio_tell(pb);
if (avio_rl32(pb) != MKTAG('d', 'a', 't', 'a')) if (avio_rl32(pb) != MKTAG('d', 'a', 't', 'a'))
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
dsf->data_size = avio_rl64(pb); dsf->data_size = avio_rl64(pb) - 12;
dsf->data_end += dsf->data_size; dsf->data_end += dsf->data_size + 12;
s->internal->data_offset = avio_tell(pb); s->internal->data_offset = avio_tell(pb);
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment