1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00

avformat/dsfdec: fix calculation of size of data chunk

Ignore extra 12 bytes that belong to tag and size.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol 2018-04-22 13:14:26 +02:00
parent 5d3efe9e1f
commit 00099ef0d0

View File

@ -137,8 +137,8 @@ static int dsf_read_header(AVFormatContext *s)
dsf->data_end = avio_tell(pb);
if (avio_rl32(pb) != MKTAG('d', 'a', 't', 'a'))
return AVERROR_INVALIDDATA;
dsf->data_size = avio_rl64(pb);
dsf->data_end += dsf->data_size;
dsf->data_size = avio_rl64(pb) - 12;
dsf->data_end += dsf->data_size + 12;
s->internal->data_offset = avio_tell(pb);
return 0;