diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-02-18 09:33:45 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-02-18 09:33:45 +0000 |
commit | e77a7954de2675dd41af2efcaf16dc258c8d2af4 (patch) | |
tree | 286b6f0d744a5af7ee7c1f4917ea32bd766b65f1 /libvo/video_out.c | |
parent | 6f797ffeabd3f00edc453e8cd9a90b0cde3d6b62 (diff) | |
download | mpv-e77a7954de2675dd41af2efcaf16dc258c8d2af4.tar.bz2 mpv-e77a7954de2675dd41af2efcaf16dc258c8d2af4.tar.xz |
Avoid parts of xvmc reinit when source format does not change
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22255 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/video_out.c')
-rw-r--r-- | libvo/video_out.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/libvo/video_out.c b/libvo/video_out.c index b8ec45ed14..a6b48b71e9 100644 --- a/libvo/video_out.c +++ b/libvo/video_out.c @@ -327,6 +327,8 @@ vo_functions_t* init_best_video_out(char** vo_list){ int config_video_out(vo_functions_t *vo, uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format) { + static uint32_t old_width, old_height, old_format; + int res; panscan_init(); aspect_save_orig(width,height); aspect_save_prescale(d_width,d_height); @@ -342,7 +344,14 @@ int config_video_out(vo_functions_t *vo, uint32_t width, uint32_t height, vo_dwidth = d_width; vo_dheight = d_height; - return vo->config(width, height, d_width, d_height, flags, title, format); + if (vo_config_count && width == old_width && height == old_height && + format == old_format) + flags |= VOFLAG_SAME_INPUT; + res = vo->config(width, height, d_width, d_height, flags, title, format); + if (!res) { + old_width = width; old_height = height; old_format = format; + } + return res; } #if defined(HAVE_FBDEV)||defined(HAVE_VESA) |