[vlc-devel] commit: Fix HDTV height for H.264 streams with correct PAR. ( Marian Ďurkovič )

git version control git at videolan.org
Tue Sep 8 15:35:57 CEST 2009


vlc | branch: master | Marian Ďurkovič <md at bts.sk> | Tue Sep  8 15:34:20 2009 +0200| [907e42f1cb64e2e7c946b056db5ceb724d0aadd4] | committer: Marian Ďurkovič 

Fix HDTV height for H.264 streams with correct PAR.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=907e42f1cb64e2e7c946b056db5ceb724d0aadd4
---

 src/input/decoder.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/input/decoder.c b/src/input/decoder.c
index 1209b53..89efbfc 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -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)");
         }
 




More information about the vlc-devel mailing list