[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:49:51 CEST 2009


vlc | branch: 1.0-bugfix | Marian Ďurkovič <md at bts.sk> | Tue Sep  8 15:34:20 2009 +0200| [37ce419ece3742de0a1037c0bd3459f42f638b98] | committer: Marian Ďurkovič 

Fix HDTV height for H.264 streams with correct PAR.
(cherry picked from commit 907e42f1cb64e2e7c946b056db5ceb724d0aadd4)

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

 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 e3dc200..b110a1e 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -2291,8 +2291,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