[FFmpeg-devel] [PATCH 4/5] asfdec_o: break if EOF is reached after asf_read_packet_header
Andreas Cadhalpun
andreas.cadhalpun at googlemail.com
Wed Jan 6 19:56:28 CET 2016
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 at googlemail.com>
---
libavformat/asfdec_o.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/asfdec_o.c b/libavformat/asfdec_o.c
index 4a3c815..ca4a066 100644
--- a/libavformat/asfdec_o.c
+++ b/libavformat/asfdec_o.c
@@ -1434,6 +1434,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
--
2.6.4
More information about the ffmpeg-devel
mailing list