[FFmpeg-cvslog] r22703 - trunk/libavformat/txd.c
reimar
subversion
Sat Mar 27 20:10:24 CET 2010
Author: reimar
Date: Sat Mar 27 20:10:24 2010
New Revision: 22703
Log:
Use more appropriate return values in txd demuxer.
Modified:
trunk/libavformat/txd.c
Modified: trunk/libavformat/txd.c
==============================================================================
--- trunk/libavformat/txd.c Sat Mar 27 20:09:46 2010 (r22702)
+++ trunk/libavformat/txd.c Sat Mar 27 20:10:24 2010 (r22703)
@@ -62,10 +62,10 @@ next_chunk:
marker = get_le32(pb);
if (url_feof(s->pb))
- return AVERROR(EIO);
+ return AVERROR_EOF;
if (marker != TXD_MARKER && marker != TXD_MARKER2) {
av_log(s, AV_LOG_ERROR, "marker does not match\n");
- return AVERROR(EIO);
+ return AVERROR_INVALIDDATA;
}
switch (id) {
@@ -79,13 +79,15 @@ next_chunk:
goto next_chunk;
default:
av_log(s, AV_LOG_ERROR, "unknown chunk id %i\n", id);
- return AVERROR(EIO);
+ return AVERROR_INVALIDDATA;
}
ret = av_get_packet(s->pb, pkt, chunk_size);
+ if (ret < 0)
+ return ret;
pkt->stream_index = 0;
- return ret <= 0 ? AVERROR(EIO) : ret;
+ return 0;
}
AVInputFormat txd_demuxer =
More information about the ffmpeg-cvslog
mailing list