aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2010-03-27 19:10:24 +0000
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2010-03-27 19:10:24 +0000
commitd14f5391c1c07c1629206446d7f6137101e476c3 (patch)
treee2ce7f23cddf145d4247719d0fe63579bc095861
parent36031c20330d7822ddc984ea8b35d55f6454e014 (diff)
downloadffmpeg-d14f5391c1c07c1629206446d7f6137101e476c3.tar.gz
Use more appropriate return values in txd demuxer.
Originally committed as revision 22703 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/txd.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libavformat/txd.c b/libavformat/txd.c
index 0fd33e600d..6a06711bc4 100644
--- a/libavformat/txd.c
+++ b/libavformat/txd.c
@@ -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 =