From eff0ca9eaa36b3294e57f336f8f86170a2b0b091 Mon Sep 17 00:00:00 2001 From: atmos4 Date: Wed, 27 Mar 2002 04:16:38 +0000 Subject: [PATCH] Fix resizing when zoom is used and image size changes between frames. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5369 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_x11.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c index 41b99dc600..0ca0fe1fa6 100644 --- a/libvo/vo_x11.c +++ b/libvo/vo_x11.c @@ -392,9 +392,8 @@ static uint32_t config( uint32_t width,uint32_t height,uint32_t d_width,uint32_t default: draw_alpha_fnc=draw_alpha_null; } - /* we avoid unnecessary allocating the swsContext here as it is allocated during draw_slice if zoom is on */ - if(!zoomFlag) - swsContext= getSwsContextFromCmdLine(width, height, in_format, width, height, out_format ); + /* always allocate swsContext as size could change between frames */ + swsContext= getSwsContextFromCmdLine(width, height, in_format, width, height, out_format ); // printf( "X11 color mask: R:%lX G:%lX B:%lX\n",myximage->red_mask,myximage->green_mask,myximage->blue_mask );