1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2016-06-21 23:40:05 +02:00
parent 3f380b9b40
commit e0faad837c
2 changed files with 2 additions and 0 deletions

View File

@ -1141,6 +1141,7 @@ retry_duration:
leave: leave:
last = avio_rb32(s->pb); last = avio_rb32(s->pb);
if (last != orig_size + 11 && last != orig_size + 10 && if (last != orig_size + 11 && last != orig_size + 10 &&
!avio_feof(s->pb) &&
(last != orig_size || !last) && last != flv->sum_flv_tag_size && (last != orig_size || !last) && last != flv->sum_flv_tag_size &&
!flv->broken_sizes) { !flv->broken_sizes) {
av_log(s, AV_LOG_ERROR, "Packet mismatch %d %d %d\n", last, orig_size + 11, flv->sum_flv_tag_size); av_log(s, AV_LOG_ERROR, "Packet mismatch %d %d %d\n", last, orig_size + 11, flv->sum_flv_tag_size);

View File

@ -612,3 +612,4 @@
0, 11612, 11612, 33, 1078, 0x501d1c72, F=0x0 0, 11612, 11612, 33, 1078, 0x501d1c72, F=0x0
0, 11645, 11645, 33, 2600, 0xdf370d24, F=0x0 0, 11645, 11645, 33, 2600, 0xdf370d24, F=0x0
1, 11656, 11656, 46, 346, 0x8899a188 1, 11656, 11656, 46, 346, 0x8899a188
0, 11678, 11678, 33, 1190, 0xdc1e4c99, F=0x0