vlc | branch: master | Steve Lhomme <[email protected]> | Tue Sep  5 13:37:26 
2017 +0200| [4e5b8cd2b98a548cd972d12433c04d3cfe0f6e64] | committer: 
Jean-Baptiste Kempf

avcodec: initialize the color settings of the AVCodecContext from the fmt_in

It may come from the demuxer and/or the packetizer.
The decoder might change the values later.

Signed-off-by: Jean-Baptiste Kempf <[email protected]>

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

 modules/codec/avcodec/video.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index 52a653981e..022fc0d884 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -399,6 +399,8 @@ static int OpenVideoCodec( decoder_t *p_dec )
     p_sys->level = -1;
     cc_Init( &p_sys->cc );
 
+    set_video_color_settings( &p_dec->fmt_in.video, ctx );
+
     post_mt( p_sys );
     ret = ffmpeg_OpenCodec( p_dec, ctx, codec );
     wait_mt( p_sys );

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to