[MPlayer-cvslog] r32570 - trunk/libvo/vo_kva.c

komh subversion at mplayerhq.hu
Tue Nov 2 14:59:13 CET 2010


Author: komh
Date: Tue Nov  2 14:59:13 2010
New Revision: 32570

Log:
Restore all the attributes after changing aspect ratio.

kvaSetup() resets all the attributes, so there is need to restore them.

Modified:
   trunk/libvo/vo_kva.c

Modified: trunk/libvo/vo_kva.c
==============================================================================
--- trunk/libvo/vo_kva.c	Tue Nov  2 14:51:52 2010	(r32569)
+++ trunk/libvo/vo_kva.c	Tue Nov  2 14:59:13 2010	(r32570)
@@ -140,8 +140,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,


More information about the MPlayer-cvslog mailing list