On Sat, Sep 17, 2011 at 04:56:32PM +0200, [email protected] wrote: > From: Laurent Aimar <[email protected]> > > --- > libavformat/rmdec.c | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c > index 02ff7e9..1c96573 100644 > --- a/libavformat/rmdec.c > +++ b/libavformat/rmdec.c > @@ -764,6 +764,8 @@ ff_rm_parse_packet (AVFormatContext *s, AVIOContext *pb, > ast->sub_packet_cnt = 0; > rm->audio_stream_num = st->index; > rm->audio_pkt_cnt = h * w / st->codec->block_align; > + if (rm->audio_pkt_cnt <= 0) > + return -1; > } else if ((ast->deint_id == DEINT_ID_VBRF) || > (ast->deint_id == DEINT_ID_VBRS)) { > int x; > --
Hmm, it's calculated from two static parameters (i.e. they don't change during decoding) and one dynamic (ast->sub_packet_cnt), so maybe it makes sense just to check some of them earlier? _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
