[vlc-devel] [PATCH 09/13] decoder: apply the "hdtv-fix" option to all decoder output

Steve Lhomme robux4 at ycbcr.xyz
Tue Feb 19 10:38:22 CET 2019


---
 src/input/decoder.c         | 12 ------------
 src/input/decoder_helpers.c | 12 ++++++++++++
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index 58a2445c7d..54b2877138 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -456,18 +456,6 @@ static int vout_update_format( decoder_t *p_dec )
 
         video_format_t fmt = p_dec->fmt_out.video;
 
-        if( fmt.i_visible_height == 1088 &&
-            var_CreateGetBool( p_dec, "hdtv-fix" ) )
-        {
-            fmt.i_visible_height = 1080;
-            if( !(fmt.i_sar_num % 136))
-            {
-                fmt.i_sar_num *= 135;
-                fmt.i_sar_den *= 136;
-            }
-            msg_Warn( p_dec, "Fixing broken HDTV stream (display_height=1088)");
-        }
-
         if( !fmt.i_sar_num || !fmt.i_sar_den )
         {
             fmt.i_sar_num = 1;
diff --git a/src/input/decoder_helpers.c b/src/input/decoder_helpers.c
index c2242c330a..ee1d4624e6 100644
--- a/src/input/decoder_helpers.c
+++ b/src/input/decoder_helpers.c
@@ -127,6 +127,18 @@ int decoder_UpdateVideoFormat( decoder_t *dec )
         }
     }
 
+    if( fmt_out.i_visible_height == 1088 &&
+        var_CreateGetBool( dec, "hdtv-fix" ) )
+    {
+        fmt_out.i_visible_height = 1080;
+        if( !(fmt_out.i_sar_num % 136))
+        {
+            fmt_out.i_sar_num *= 135;
+            fmt_out.i_sar_den *= 136;
+        }
+        msg_Warn( dec, "Fixing broken HDTV stream (display_height=1088)");
+    }
+
     video_format_t original = dec->fmt_out.video;
     dec->fmt_out.video = fmt_out;
     int err = dec->cbs->video.format_update( dec );
-- 
2.17.1



More information about the vlc-devel mailing list