Browse Source

asfdec: break if EOF is reached after asf_read_packet_header

asf_read_payload can unset eof_reached, so check it also before calling
that function.

This fixes infinite loops.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Alexandra Hájková <alexandra@khirnov.net>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
tags/n3.1
Andreas Cadhalpun Luca Barbato 10 years ago
parent
commit
a32dbf2aed
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/asfdec.c

+ 2
- 0
libavformat/asfdec.c View File

@@ -1425,6 +1425,8 @@ static int asf_read_packet(AVFormatContext *s, AVPacket *pkt)
while (!pb->eof_reached) {
if (asf->state == PARSE_PACKET_HEADER) {
asf_read_packet_header(s);
if (pb->eof_reached)
break;
if (!asf->nb_mult_left)
asf->state = READ_SINGLE;
else


Loading…
Cancel
Save