Mercurial > libavformat.hg
changeset 5898:cda7add41fbb libavformat
Use more appropriate return values in txd demuxer.
author | reimar |
---|---|
date | Sat, 27 Mar 2010 19:10:24 +0000 |
parents | d7f41380f52c |
children | d80731fed8ee |
files | txd.c |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/txd.c Sat Mar 27 19:09:46 2010 +0000 +++ b/txd.c Sat Mar 27 19:10:24 2010 +0000 @@ -62,10 +62,10 @@ 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 @@ 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 =