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). --- src/combined/ffmpeg/ff_video_decoder.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src') 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 From 393039dbf092579847f43821fb694ac5789c56fb Mon Sep 17 00:00:00 2001 From: Darren Salt Date: Wed, 10 Mar 2010 21:14:14 +0000 Subject: Make buildable with current (external) libdvdnav & libdvdread. --- src/dxr3/dxr3_decode_spu.c | 9 +++++++-- src/input/input_dvd.c | 8 +++++++- src/libspudec/spu.c | 9 +++++++-- src/libspudec/spu.h | 6 +++++- src/libspudec/xine_spu_decoder.c | 9 +++++++-- 5 files changed, 33 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/dxr3/dxr3_decode_spu.c b/src/dxr3/dxr3_decode_spu.c index e3d4f969b..683666d21 100644 --- a/src/dxr3/dxr3_decode_spu.c +++ b/src/dxr3/dxr3_decode_spu.c @@ -51,8 +51,13 @@ #include "buffer.h" #include "xine-engine/bswap.h" #ifdef HAVE_DVDNAV -# include -# include +# ifdef HAVE_DVDNAV_NAVTYPES_H +# include +# include +# else +# include +# include +# endif #else # include "nav_types.h" # include "nav_read.h" diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c index 400f82aca..27e49e05a 100644 --- a/src/input/input_dvd.c +++ b/src/input/input_dvd.c @@ -79,7 +79,13 @@ /* DVDNAV includes */ #ifdef HAVE_DVDNAV # include -# include +# ifdef HAVE_DVDNAV_NAVTYPES_H +# include +# include +# else +# include +# include +# endif #else # define DVDNAV_COMPILE # include "dvdnav.h" diff --git a/src/libspudec/spu.c b/src/libspudec/spu.c index a9319f103..80d1eeaf5 100644 --- a/src/libspudec/spu.c +++ b/src/libspudec/spu.c @@ -57,8 +57,13 @@ #include "buffer.h" #include "xine-engine/bswap.h" #ifdef HAVE_DVDNAV -# include -# include +# ifdef HAVE_DVDNAV_NAVTYPES_H +# include +# include +# else +# include +# include +# endif #else # include "nav_read.h" # include "nav_print.h" diff --git a/src/libspudec/spu.h b/src/libspudec/spu.h index 54efe1968..a1bc5b971 100644 --- a/src/libspudec/spu.h +++ b/src/libspudec/spu.h @@ -33,7 +33,11 @@ #include "video_out.h" #include "video_overlay.h" #ifdef HAVE_DVDNAV -# include +# ifdef HAVE_DVDNAV_NAVTYPES_H +# include +# else +# include +# endif #else # include "nav_types.h" #endif diff --git a/src/libspudec/xine_spu_decoder.c b/src/libspudec/xine_spu_decoder.c index 1f40dbb27..3d23bba21 100644 --- a/src/libspudec/xine_spu_decoder.c +++ b/src/libspudec/xine_spu_decoder.c @@ -39,8 +39,13 @@ #include "xineutils.h" #include "spu.h" #ifdef HAVE_DVDNAV -# include -# include +# ifdef HAVE_DVDNAV_NAVTYPES_H +# include +# include +# else +# include +# include +# endif #else # include "nav_read.h" # include "nav_types.h" -- cgit v1.2.3