Commit bb116bdc authored by reimar's avatar reimar

Use more appropriate return values in txd demuxer.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@22703 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 352448c6
......@@ -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 =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment