[FFmpeg-cvslog] avformat/flvdec: Do not check last size if it could not be read due to EOF

Michael Niedermayer git at videolan.org
Wed Jun 22 03:05:24 CEST 2016


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Tue Jun 21 23:40:05 2016 +0200| [e0faad837cd5047a1310cefa0cf163d8caa865e7] | committer: Michael Niedermayer

avformat/flvdec: Do not check last size if it could not be read due to EOF

Fixes part of Ticket5648
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavformat/flvdec.c     |    1 +
 tests/ref/fate/flv-demux |    1 +
 2 files changed, 2 insertions(+)

diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 25dfba5..2bf1e05 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -1141,6 +1141,7 @@ retry_duration:
 leave:
     last = avio_rb32(s->pb);
     if (last != orig_size + 11 && last != orig_size + 10 &&
+        !avio_feof(s->pb) &&
         (last != orig_size || !last) && last != flv->sum_flv_tag_size &&
         !flv->broken_sizes) {
         av_log(s, AV_LOG_ERROR, "Packet mismatch %d %d %d\n", last, orig_size + 11, flv->sum_flv_tag_size);
diff --git a/tests/ref/fate/flv-demux b/tests/ref/fate/flv-demux
index 79ee263..0a4598c 100644
--- a/tests/ref/fate/flv-demux
+++ b/tests/ref/fate/flv-demux
@@ -612,3 +612,4 @@
 0,      11612,      11612,       33,     1078, 0x501d1c72, F=0x0
 0,      11645,      11645,       33,     2600, 0xdf370d24, F=0x0
 1,      11656,      11656,       46,      346, 0x8899a188
+0,      11678,      11678,       33,     1190, 0xdc1e4c99, F=0x0



More information about the ffmpeg-cvslog mailing list