Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2017-02-11 22:07:39 +0300
committerPaul B Mahol <onemda@gmail.com>2017-02-11 22:20:07 +0300
commit25d9cb462132e71143a2b87e80c2b02a0441fcf3 (patch)
tree6a263cf000209b381e4adc4b2373cd9d529fb756 /libavformat/flic.c
parent5781c983d880e17ffc9b283baa9fb13bad1748f9 (diff)
avformat/flic: fix handling of EOF case
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat/flic.c')
-rw-r--r--libavformat/flic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/flic.c b/libavformat/flic.c
index 49f5d21f98..7c62cb423c 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 = {