]> git.sesse.net Git - vlc/commitdiff
Fix HDTV height for H.264 streams with correct PAR.
authorMarian Ďurkovič <md@bts.sk>
Tue, 8 Sep 2009 13:34:20 +0000 (15:34 +0200)
committerMarian Ďurkovič <md@bts.sk>
Tue, 8 Sep 2009 13:34:20 +0000 (15:34 +0200)
src/input/decoder.c

index 1209b53d618101d3feb5ff76898c8f212d41c9ea..89efbfce9bf218994c3a4e5d264c5db476cbab66 100644 (file)
@@ -2285,8 +2285,11 @@ static picture_t *vout_new_buffer( decoder_t *p_dec )
             var_CreateGetBool( p_dec, "hdtv-fix" ) )
         {
             p_dec->fmt_out.video.i_visible_height = 1080;
-            p_dec->fmt_out.video.i_sar_num *= 135;
-            p_dec->fmt_out.video.i_sar_den *= 136;
+            if( !(p_dec->fmt_out.video.i_sar_num % 136))
+            {
+                p_dec->fmt_out.video.i_sar_num *= 135;
+                p_dec->fmt_out.video.i_sar_den *= 136;
+            }
             msg_Warn( p_dec, "Fixing broken HDTV stream (display_height=1088)");
         }