[FFmpeg-cvslog] avformat/flic: fix handling of EOF case
Paul B Mahol
git at videolan.org
Sat Feb 11 21:20:30 EET 2017
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Feb 11 20:07:39 2017 +0100| [25d9cb462132e71143a2b87e80c2b02a0441fcf3] | committer: Paul B Mahol
avformat/flic: fix handling of EOF case
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=25d9cb462132e71143a2b87e80c2b02a0441fcf3
---
libavformat/flic.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavformat/flic.c b/libavformat/flic.c
index 49f5d21..7c62cb4 100644
--- a/libavformat/flic.c
+++ b/libavformat/flic.c
@@ -204,7 +204,7 @@ static int flic_read_packet(AVFormatContext *s,
int ret = 0;
unsigned char preamble[FLIC_PREAMBLE_SIZE];
- while (!packet_read) {
+ while (!packet_read && !avio_feof(pb)) {
if ((ret = avio_read(pb, preamble, FLIC_PREAMBLE_SIZE)) !=
FLIC_PREAMBLE_SIZE) {
@@ -256,7 +256,7 @@ static int flic_read_packet(AVFormatContext *s,
}
}
- return ret;
+ return avio_feof(pb) ? AVERROR_EOF : ret;
}
AVInputFormat ff_flic_demuxer = {
More information about the ffmpeg-cvslog
mailing list