From 8c0b202a58fbce2a96ce3d02eea24b0e1e786e7a Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Wed, 10 Mar 2010 19:14:22 +0000 Subject: Handle odd widths properly (for ffmpeg-decoded video). --- ChangeLog | 1 + src/combined/ffmpeg/ff_video_decoder.c | 7 +------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 275af29fb..9eaa7df37 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ xine-lib (1.1.18.1) 2010-03-06 * Fix up V4L/V4L2 compilation. Some non-Linux have V4L2 but not V4L. * Fix a size check (wrong variable, causing int/ptr comparison) in rmff.c. * Fix build with the old, outdated and deprecated internal ffmpeg. + * Handle odd widths properly (for ffmpeg-decoded video). xine-lib (1.1.18) 2010-02-23 * Bump the FLAC decoder's priority above ffmpegaudio. This should fix diff --git a/src/combined/ffmpeg/ff_video_decoder.c b/src/combined/ffmpeg/ff_video_decoder.c index 8c604e047..7d0d74b77 100644 --- a/src/combined/ffmpeg/ff_video_decoder.c +++ b/src/combined/ffmpeg/ff_video_decoder.c @@ -309,11 +309,6 @@ static void init_video_codec (ff_video_decoder_t *this, unsigned int codec_type) lprintf("lavc decoder found\n"); - /* force (width % 8 == 0), otherwise there will be - * display problems with Xv. - */ - this->bih.biWidth = (this->bih.biWidth + 1) & (~1); - this->context->width = this->bih.biWidth; this->context->height = this->bih.biHeight; this->context->stream_codec_tag = this->context->codec_tag = @@ -1389,7 +1384,7 @@ static void ff_handle_buffer (ff_video_decoder_t *this, buf_element_t *buf) { (this->context->pix_fmt == PIX_FMT_RGB24) || (this->context->pix_fmt == PIX_FMT_PAL8)) { this->output_format = XINE_IMGFMT_YUY2; - init_yuv_planes(&this->yuv, this->bih.biWidth, this->bih.biHeight); + init_yuv_planes(&this->yuv, (this->bih.biWidth + 15) & ~15, this->bih.biHeight); this->yuv_init = 1; } this->cs_convert_init = 1; -- cgit v1.2.3