[FFmpeg-devel] [PATCH 4/7] Ensure that the video dimension are a multiple of 16 in the 4xm decoder.

Laurent Aimar fenrir at elivagar.org
Sun Oct 2 15:51:35 CEST 2011


On Sun, Oct 02, 2011 at 03:03:39AM +0200, Michael Niedermayer wrote:
> On Sun, Oct 02, 2011 at 12:38:29AM +0200, fenrir at elivagar.org wrote:
> > From: Laurent Aimar <fenrir at videolan.org>
> > 
> > ---
> >  libavcodec/4xm.c |    2 ++
> >  1 files changed, 2 insertions(+), 0 deletions(-)
> > 
> > diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
> > index 6335879..6ee9b34 100644
> > --- a/libavcodec/4xm.c
> > +++ b/libavcodec/4xm.c
> > @@ -866,6 +866,8 @@ static av_cold int decode_init(AVCodecContext *avctx){
> >          return 1;
> >      }
> >  
> > +    avctx->width  = FFALIGN(avctx->width, 16);
> > +    avctx->height = FFALIGN(avctx->height, 16);
> >      avcodec_get_frame_defaults(&f->current_picture);
> 
> This doesnt look correct.
> If width/height must be a multiple of 16 then the decoder should fail
> if its not so. Otherwise it should support it and not return a bigger
> picture
 Ok, new patch attached.

-- 
fenrir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Reject-video-with-non-multiple-of-16-width-height-in.patch
Type: text/x-diff
Size: 912 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111002/e12976ff/attachment.bin>


More information about the ffmpeg-devel mailing list