From d175ace5bcc64881ab839ca1fd508830d8704a54 Mon Sep 17 00:00:00 2001 From: James Stembridge Date: Thu, 1 Jul 2004 20:56:15 +0000 Subject: Use avcodec_align_dimensions for querying required frame dimension alignments CVS patchset: 6762 CVS date: 2004/07/01 20:56:15 --- src/libffmpeg/video_decoder.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/libffmpeg/video_decoder.c b/src/libffmpeg/video_decoder.c index 87bc67b13..b7684a615 100644 --- a/src/libffmpeg/video_decoder.c +++ b/src/libffmpeg/video_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_decoder.c,v 1.20 2004/07/01 20:16:24 jstembridge Exp $ + * $Id: video_decoder.c,v 1.21 2004/07/01 20:56:15 jstembridge Exp $ * * xine video decoder plugin using ffmpeg * @@ -118,12 +118,10 @@ struct ff_video_decoder_s { static int get_buffer(AVCodecContext *context, AVFrame *av_frame){ ff_video_decoder_t * this = (ff_video_decoder_t *)context->opaque; vo_frame_t *img; - int align, width, height; + int width = context->width; + int height = context->height; - align=15; - - width = (context->width +align)&~align; - height = (context->height+align)&~align; + avcodec_align_dimensions(context, &width, &height); if( (this->context->pix_fmt != PIX_FMT_YUV420P) || (width != this->bih.biWidth) || (height != this->bih.biHeight) ) { -- cgit v1.2.3