From 97773f25cd76cf680a74e7c66c5e75a7624f22ed Mon Sep 17 00:00:00 2001 From: Tristan Matthews Date: Sun, 5 Jun 2016 10:49:26 +0200 Subject: [PATCH] vpx: default fmt_out aspect ratio to 1:1 if unset 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 4d5cb145c9..d31428ebf9 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; -- 2.11.4.GIT