Commit 1f4b7408 authored by Marian Durkovic's avatar Marian Durkovic

prepare video outputs for display size not equal to encoded size

parent 6798e163
...@@ -42,7 +42,8 @@ ...@@ -42,7 +42,8 @@
#include SDL_INCLUDE_FILE #include SDL_INCLUDE_FILE
#define SDL_MAX_DIRECTBUFFERS 10 /* SDL is not able to crop overlays - so use only 1 direct buffer */
#define SDL_MAX_DIRECTBUFFERS 1
#define SDL_DEFAULT_BPP 16 #define SDL_DEFAULT_BPP 16
/***************************************************************************** /*****************************************************************************
......
...@@ -2030,6 +2030,11 @@ static IMAGE_TYPE * CreateShmImage( vout_thread_t *p_vout, ...@@ -2030,6 +2030,11 @@ static IMAGE_TYPE * CreateShmImage( vout_thread_t *p_vout,
/* Create XImage / XvImage */ /* Create XImage / XvImage */
#ifdef MODULE_NAME_IS_xvideo #ifdef MODULE_NAME_IS_xvideo
/* Make sure the buffer is aligned to multiple of 16 */
i_height = ( i_height + 15 ) >> 4 << 4;
i_width = ( i_width + 15 ) >> 4 << 4;
p_image = XvShmCreateImage( p_display, i_xvport, i_chroma, 0, p_image = XvShmCreateImage( p_display, i_xvport, i_chroma, 0,
i_width, i_height, p_shm ); i_width, i_height, p_shm );
#else #else
...@@ -2114,6 +2119,11 @@ static IMAGE_TYPE * CreateImage( vout_thread_t *p_vout, ...@@ -2114,6 +2119,11 @@ static IMAGE_TYPE * CreateImage( vout_thread_t *p_vout,
/* Allocate memory for image */ /* Allocate memory for image */
#ifdef MODULE_NAME_IS_xvideo #ifdef MODULE_NAME_IS_xvideo
/* Make sure the buffer is aligned to multiple of 16 */
i_height = ( i_height + 15 ) >> 4 << 4;
i_width = ( i_width + 15 ) >> 4 << 4;
p_data = (byte_t *) malloc( i_width * i_height * i_bits_per_pixel / 8 ); p_data = (byte_t *) malloc( i_width * i_height * i_bits_per_pixel / 8 );
#elif defined(MODULE_NAME_IS_x11) #elif defined(MODULE_NAME_IS_x11)
i_bytes_per_line = i_width * i_bytes_per_pixel; i_bytes_per_line = i_width * i_bytes_per_pixel;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment