1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Use more appropriate return values in txd demuxer.

Originally committed as revision 22703 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Reimar Döffinger 2010-03-27 19:10:24 +00:00
parent 36031c2033
commit d14f5391c1

View File

@ -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 =