Commit 25d9cb46 authored by Paul B Mahol's avatar Paul B Mahol

avformat/flic: fix handling of EOF case

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent 5781c983
...@@ -204,7 +204,7 @@ static int flic_read_packet(AVFormatContext *s, ...@@ -204,7 +204,7 @@ static int flic_read_packet(AVFormatContext *s,
int ret = 0; int ret = 0;
unsigned char preamble[FLIC_PREAMBLE_SIZE]; unsigned char preamble[FLIC_PREAMBLE_SIZE];
while (!packet_read) { while (!packet_read && !avio_feof(pb)) {
if ((ret = avio_read(pb, preamble, FLIC_PREAMBLE_SIZE)) != if ((ret = avio_read(pb, preamble, FLIC_PREAMBLE_SIZE)) !=
FLIC_PREAMBLE_SIZE) { FLIC_PREAMBLE_SIZE) {
...@@ -256,7 +256,7 @@ static int flic_read_packet(AVFormatContext *s, ...@@ -256,7 +256,7 @@ static int flic_read_packet(AVFormatContext *s,
} }
} }
return ret; return avio_feof(pb) ? AVERROR_EOF : ret;
} }
AVInputFormat ff_flic_demuxer = { AVInputFormat ff_flic_demuxer = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment