diff options
author | Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> | 2015-03-08 23:31:48 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-06-10 02:13:09 +0200 |
commit | 9be586e166472eca4ce2770f00a6c72d33c26f33 (patch) | |
tree | 129bd07a57b8eabe41358b22a2e266472139096f | |
parent | 3d11279745a64e7eb65f63b76dbc9d561651fcfc (diff) | |
download | ffmpeg-9be586e166472eca4ce2770f00a6c72d33c26f33.tar.gz |
ffmdec: fix infinite loop at EOF
If EOF is reached, while skipping bytes, avio_tell(pb) won't change
anymore, resulting in an infinite loop.
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6fa98822eba501a4898fdec5b75acd3026201005)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/ffmdec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c index 02cf790f87..601ddaaf8e 100644 --- a/libavformat/ffmdec.c +++ b/libavformat/ffmdec.c @@ -347,7 +347,7 @@ static int ffm2_read_header(AVFormatContext *s) } /* get until end of block reached */ - while ((avio_tell(pb) % ffm->packet_size) != 0) + while ((avio_tell(pb) % ffm->packet_size) != 0 && !pb->eof_reached) avio_r8(pb); /* init packet demux */ @@ -477,7 +477,7 @@ static int ffm_read_header(AVFormatContext *s) } /* get until end of block reached */ - while ((avio_tell(pb) % ffm->packet_size) != 0) + while ((avio_tell(pb) % ffm->packet_size) != 0 && !pb->eof_reached) avio_r8(pb); /* init packet demux */ |