[FFmpeg-cvslog] asfdec: break if EOF is reached after asf_read_packet_header
Andreas Cadhalpun
git at videolan.org
Tue Feb 16 18:38:05 CET 2016
ffmpeg | branch: master | Andreas Cadhalpun <andreas.cadhalpun at googlemail.com> | Wed Jan 6 21:09:19 2016 +0100| [a32dbf2aed3bb720a28141e1e84284ade3969a49] | committer: Luca Barbato
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 at googlemail.com>
Signed-off-by: Alexandra Hájková <alexandra at khirnov.net>
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a32dbf2aed3bb720a28141e1e84284ade3969a49
---
libavformat/asfdec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index 90a1df4..460df2a 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -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
More information about the ffmpeg-cvslog
mailing list