[FFmpeg-cvslog] Correctly signal EOF when demuxing caf files.
Carl Eugen Hoyos
git at videolan.org
Tue Nov 20 22:04:55 CET 2012
ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Tue Nov 20 22:04:03 2012 +0100| [b1e190d0fddbad800a8b89f9ea840e73257bf6e5] | committer: Carl Eugen Hoyos
Correctly signal EOF when demuxing caf files.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b1e190d0fddbad800a8b89f9ea840e73257bf6e5
---
libavformat/cafdec.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c
index f166804..8d39bfb 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);
}
More information about the ffmpeg-cvslog
mailing list