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

Tristan Matthews git at videolan.org
Sun Jun 5 11:06:50 CEST 2016


vlc | branch: master | Tristan Matthews <tmatth at videolan.org> | Sun Jun  5 10:49:26 2016 +0200| [97773f25cd76cf680a74e7c66c5e75a7624f22ed] | committer: Tristan Matthews

vpx: default fmt_out aspect ratio to 1:1 if unset

Fixes transcoding issues

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

 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;



More information about the vlc-commits mailing list