diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2012-11-20 22:04:03 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2012-11-20 22:04:03 +0100 |
commit | b1e190d0fddbad800a8b89f9ea840e73257bf6e5 (patch) | |
tree | 020a9e49a4a076d8a741b6553df62477dc9f932c | |
parent | 52b7823b737dc712ca2b2c1f5712c3a0a3705de8 (diff) | |
download | ffmpeg-b1e190d0fddbad800a8b89f9ea840e73257bf6e5.tar.gz |
Correctly signal EOF when demuxing caf files.
-rw-r--r-- | libavformat/cafdec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c index f166804795..8d39bfb831 100644 --- a/libavformat/cafdec.c +++ b/libavformat/cafdec.c @@ -348,7 +348,9 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt) /* don't read past end of data chunk */ if (caf->data_size > 0) { left = (caf->data_start + caf->data_size) - avio_tell(pb); - if (left <= 0) + if (!left) + return AVERROR_EOF; + if (left < 0) return AVERROR(EIO); } |