[vlc-devel] [PATCH] vpx: default fmt_out aspect ratio to 1:1 if unset

Tristan Matthews tmatth at videolan.org
Sun Jun 5 10:51:08 CEST 2016


Fixes transcoding issues
---
 modules/codec/vpx.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/modules/codec/vpx.c b/modules/codec/vpx.c
index 4d5cb14..d31428e 100644
--- a/modules/codec/vpx.c
+++ b/modules/codec/vpx.c
@@ -163,6 +163,15 @@ static picture_t *Decode(decoder_t *dec, block_t **pp_block)
         v->i_visible_height = img->d_h;
     }
 
+    if( !dec->fmt_in.video.i_sar_num || !dec->fmt_in.video.i_sar_den )
+    {
+        if( !dec->fmt_out.video.i_sar_num || !dec->fmt_out.video.i_sar_den )
+        {
+            dec->fmt_out.video.i_sar_num = 1;
+            dec->fmt_out.video.i_sar_den = 1;
+        }
+    }
+
     picture_t *pic = decoder_NewPicture(dec);
     if (!pic)
         return NULL;
-- 
1.9.1



More information about the vlc-devel mailing list