Commit b1e190d0 authored by Carl Eugen Hoyos's avatar Carl Eugen Hoyos

Correctly signal EOF when demuxing caf files.

parent 52b7823b
...@@ -348,7 +348,9 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt) ...@@ -348,7 +348,9 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
/* don't read past end of data chunk */ /* don't read past end of data chunk */
if (caf->data_size > 0) { if (caf->data_size > 0) {
left = (caf->data_start + caf->data_size) - avio_tell(pb); left = (caf->data_start + caf->data_size) - avio_tell(pb);
if (left <= 0) if (!left)
return AVERROR_EOF;
if (left < 0)
return AVERROR(EIO); return AVERROR(EIO);
} }
......
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