[vlc-commits] mosaic_bridge: use picture_NewFromFormat to allocate pictures
Steve Lhomme
git at videolan.org
Fri Feb 8 14:00:41 CET 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Feb 8 11:39:17 2019 +0100| [1c8cc9b5912f364b083edb91300795d3d6f0d501] | committer: Steve Lhomme
mosaic_bridge: use picture_NewFromFormat to allocate pictures
So we keep all the metadata we get from the decoder.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1c8cc9b5912f364b083edb91300795d3d6f0d501
---
modules/stream_out/mosaic_bridge.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/stream_out/mosaic_bridge.c b/modules/stream_out/mosaic_bridge.c
index 13190b98f0..7c0b8b041c 100644
--- a/modules/stream_out/mosaic_bridge.c
+++ b/modules/stream_out/mosaic_bridge.c
@@ -543,11 +543,11 @@ static void decoder_queue_video( decoder_t *p_dec, picture_t *p_pic )
else
{
/* TODO: chroma conversion if needed */
+ video_format_t pic_fmt = p_pic->format;
+ pic_fmt.i_sar_num = p_fmt_in->i_sar_num;
+ pic_fmt.i_sar_den = p_fmt_in->i_sar_den;
- p_new_pic = picture_New( p_pic->format.i_chroma,
- p_pic->format.i_width, p_pic->format.i_height,
- p_fmt_in->i_sar_num,
- p_fmt_in->i_sar_den );
+ p_new_pic = picture_NewFromFormat( &pic_fmt );
if( !p_new_pic )
{
picture_Release( p_pic );
More information about the vlc-commits
mailing list