summaryrefslogtreecommitdiff
path: root/libavformat/cafdec.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2012-11-20 22:04:03 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2012-11-20 22:04:03 +0100
commitb1e190d0fddbad800a8b89f9ea840e73257bf6e5 (patch)
tree020a9e49a4a076d8a741b6553df62477dc9f932c /libavformat/cafdec.c
parent52b7823b737dc712ca2b2c1f5712c3a0a3705de8 (diff)
Correctly signal EOF when demuxing caf files.
Diffstat (limited to 'libavformat/cafdec.c')
-rw-r--r--libavformat/cafdec.c4
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);
}