summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Stembridge <jstembridge@users.sourceforge.net>2004-07-01 20:56:15 +0000
committerJames Stembridge <jstembridge@users.sourceforge.net>2004-07-01 20:56:15 +0000
commitd175ace5bcc64881ab839ca1fd508830d8704a54 (patch)
treed844e36eef42440f990b29c19abb62eeda1dfdab
parent30b610e59910c1d116a4f851c6c94ebca7cfa9f9 (diff)
downloadxine-lib-d175ace5bcc64881ab839ca1fd508830d8704a54.tar.gz
xine-lib-d175ace5bcc64881ab839ca1fd508830d8704a54.tar.bz2
Use avcodec_align_dimensions for querying required frame dimension alignments
CVS patchset: 6762 CVS date: 2004/07/01 20:56:15
-rw-r--r--src/libffmpeg/video_decoder.c10
1 files 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) ) {