From ffbc561f96139a187ba3f4036babd786b1321d0b Mon Sep 17 00:00:00 2001 From: komh Date: Tue, 2 Nov 2010 13:59:13 +0000 Subject: vo_kva: Restore all the attributes after changing aspect ratio kvaSetup() resets all the attributes, so there is need to restore them. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32570 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_kva.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libvo/vo_kva.c b/libvo/vo_kva.c index 5c0c934337..7994fe9143 100644 --- a/libvo/vo_kva.c +++ b/libvo/vo_kva.c @@ -139,8 +139,17 @@ struct { static inline void setAspectRatio(ULONG ulRatio) { + ULONG ulValue; + int i; + m_int.kvas.ulRatio = ulRatio; kvaSetup(&m_int.kvas); + + // Setup initializes all attributes, so need to restore them. + for (i = 0; i < KVAA_LAST; i++) { + kvaQueryAttr(i, &ulValue); + kvaSetAttr(i, &ulValue); + } } static int query_format_info(int format, PBOOL pfHWAccel, PFOURCC pfcc, -- cgit v1.2.3