Skip to content
Snippets Groups Projects
Commit 25d9cb46 authored by Paul B Mahol's avatar Paul B Mahol
Browse files

avformat/flic: fix handling of EOF case


Signed-off-by: default avatarPaul B Mahol <onemda@gmail.com>
parent 5781c983
No related branches found
No related tags found
No related merge requests found
...@@ -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 = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment