diff libmpcodecs/vd.c @ 36295:0bd0297b073a

Handle special argument -1 to switch_ratio as intended. Reset to the original aspect ratio that would have been used for the very first rescaling rather than to the display size ratio. This will now handle anamorphic videos correctly as well.
author ib
date Thu, 01 Aug 2013 21:18:14 +0000
parents fbbf13706c50
children 6f0ab9dd1429
line wrap: on
line diff
--- a/libmpcodecs/vd.c	Thu Aug 01 17:45:31 2013 +0000
+++ b/libmpcodecs/vd.c	Thu Aug 01 21:18:14 2013 +0000
@@ -292,6 +292,9 @@
     }
     // time to do aspect ratio corrections...
 
+    if (!sh->original_aspect)
+        sh->original_aspect = sh->stream_aspect != 0.0 ? sh->stream_aspect : sh->aspect;
+
     if (movie_aspect > -1.0)
         sh->aspect = movie_aspect;      // cmdline overrides autodetect
     else if (sh->stream_aspect != 0.0)