Hi, On Sun, Apr 29, 2012 at 6:28 PM, Luca Barbato <[email protected]> wrote: > On 29/04/12 18:11, Ronald S. Bultje wrote: >> On Sun, Apr 29, 2012 at 5:56 PM, Luca Barbato <[email protected]> wrote: >>> Do return error if memory allocation or I/O fails. >>> --- >>> libavformat/matroskadec.c | 5 +++++ >>> 1 files changed, 5 insertions(+), 0 deletions(-) >>> >>> diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c >>> index 5688658..3b78ae3 100644 >>> --- a/libavformat/matroskadec.c >>> +++ b/libavformat/matroskadec.c >>> @@ -2069,6 +2069,11 @@ static int matroska_read_packet(AVFormatContext *s, >>> AVPacket *pkt) >>> ret = matroska_parse_cluster(matroska); >>> } >>> >>> + if (ret == AVERROR_INVALIDDATA) { >>> + pkt->flags |= AV_PKT_FLAG_CORRUPT; >>> + return 0; >>> + } >>> + >>> return ret; >>> } >> >> Only if error resilience flags allow us to. Does this work if we >> didn't finish parsing the block yet, i.e. do we drop the rest of the >> data or do we recover gracefully? > > ER isn't involved, you are getting whole packets out of the demuxer, you > have a mean to drop them automagically depending on > AVFMT_FLAG_DISCARD_CORRUPT > > The behavior is in line with ogg and mpegts demuxer.
Oh I see it's handled at a generic level - OK then. Ronald _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
