Le quintidi 5 thermidor, an CCXXIV, Sophia Wang a écrit : > Signed-off-by: Sophia Wang <s...@google.com> > --- > libavformat/matroskadec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c > index f3d701f..c536605 100644 > --- a/libavformat/matroskadec.c > +++ b/libavformat/matroskadec.c > @@ -3323,7 +3323,7 @@ static int matroska_read_packet(AVFormatContext *s, > AVPacket *pkt) > while (matroska_deliver_packet(matroska, pkt)) { > int64_t pos = avio_tell(matroska->ctx->pb); > if (matroska->done) > - return AVERROR_EOF; > + return avio_feof(s->pb) ? AVERROR_EOF : AVERROR(EIO); > if (matroska_parse_cluster(matroska) < 0) > matroska_resync(matroska, pos); > }
This does not seem correct. EIO means something (usually along the lines from "you should not unplug your USB stick while watching a file stored on it" to "get a new hard drive and hope your backups are up to date"), it is not a generic error when nothing else fits; there is AVERROR_UNKNOWN for that. But I do not think AVERROR_UNKNOWN would be correct either. If I read the code correctly, the only way for matroska->done to mean something else than EOF is avio_seek() returning an error in matroska_resync(): its return value is checked for error but the exact value is discarded. Note that the return value of matroska_resync() is later ignored. (I also notice that the return value of avio_seek() is ignored all over the place in this file.) Regards, -- Nicolas George
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel