[FFmpeg-cvslog] r18899 - trunk/libavcodec/libtheoraenc.c

Reimar Döffinger Reimar.Doeffinger
Sat May 23 10:07:18 CEST 2009


On Sat, May 23, 2009 at 12:01:50AM +0200, conrad wrote:
> @@ -186,8 +186,8 @@ static int encode_frame(
>          return -1;
>      }
>  
> -    t_yuv_buffer.y_width = avc_context->width;
> -    t_yuv_buffer.y_height = avc_context->height;
> +    t_yuv_buffer.y_width = FFALIGN(avc_context->width, 16);
> +    t_yuv_buffer.y_height = FFALIGN(avc_context->height, 16);
>      t_yuv_buffer.y_stride = frame->linesize[0];


Are you sure this will not overread with e.g.
avc_context->width = 1;
avc_context->height = 1;
t_yuv_buffer.y_stride = 8;
?
I.e. a user-provided buffer that may have less alignment than lavc uses?
Or do we have restrictions on that which I did not find in a quick look
at the documentation?



More information about the ffmpeg-cvslog mailing list