On Thu, Jul 05, 2012 at 10:36:46AM +0100, Måns Rullgård wrote: > Martin Storsjö <[email protected]> writes: > > > From: Michael Niedermayer <[email protected]> > > > > Using ff_mspel_motion assumes that s (a MpegEncContext > > poiinter) really is a Wmv2Context. > > > > This fixes crashes in error resilience on vc1/wmv3 videos. > > > > CC: [email protected] > > --- > > libavcodec/mpegvideo_common.h | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/libavcodec/mpegvideo_common.h b/libavcodec/mpegvideo_common.h > > index ebf9c7d..0a73126 100644 > > --- a/libavcodec/mpegvideo_common.h > > +++ b/libavcodec/mpegvideo_common.h > > @@ -719,7 +719,8 @@ static av_always_inline void > > MPV_motion_internal(MpegEncContext *s, > > 0, 0, 0, > > ref_picture, pix_op, qpix_op, > > s->mv[dir][0][0], s->mv[dir][0][1], 16); > > - }else if(!is_mpeg12 && (CONFIG_WMV2_DECODER || > > CONFIG_WMV2_ENCODER) && s->mspel){ > > + } else if (!is_mpeg12 && (CONFIG_WMV2_DECODER || > > CONFIG_WMV2_ENCODER) && > > + s->mspel && s->codec_id == CODEC_ID_WMV2) { > > ff_mspel_motion(s, dest_y, dest_cb, dest_cr, > > ref_picture, pix_op, > > s->mv[dir][0][0], s->mv[dir][0][1], 16); > > -- > > This kind of code makes me want to scream.
At least there's hardly any hack too ugly to fit in. _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
