[FFmpeg-cvslog] avformat/dsfdec: fix calculation of size of data chunk

Paul B Mahol git at videolan.org
Sun Apr 22 14:21:27 EEST 2018


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Apr 22 13:14:26 2018 +0200| [00099ef0d0ddf6f5bdd8ddfb5b0179c560674af0] | committer: 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: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=00099ef0d0ddf6f5bdd8ddfb5b0179c560674af0
---

 libavformat/dsfdec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/dsfdec.c b/libavformat/dsfdec.c
index e0485f1492..5e06fd63a5 100644
--- a/libavformat/dsfdec.c
+++ b/libavformat/dsfdec.c
@@ -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;



More information about the ffmpeg-cvslog mailing list