changeset 32483:8975b893179e

Restore all the attributes after changing aspect ratio. kvaSetup() resets all the attributes, so there is need to restore them.
author komh
date Tue, 02 Nov 2010 13:59:13 +0000
parents cc24ebf93de4
children 4b2173a11f18
files libvo/vo_kva.c
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_kva.c	Tue Nov 02 13:51:52 2010 +0000
+++ b/libvo/vo_kva.c	Tue Nov 02 13:59:13 2010 +0000
@@ -140,8 +140,17 @@
 
 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,