[vlc-commits] codec:jpeg: set the fmt_out.i_codec early

Steve Lhomme git at videolan.org
Fri Jul 21 13:26:30 CEST 2017


vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Wed Jul 19 15:21:28 2017 +0200| [0b7ad3ef36783eaf13741b9515d3c66e25065989] | committer: Jean-Baptiste Kempf

codec:jpeg: set the fmt_out.i_codec early

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/codec/jpeg.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/codec/jpeg.c b/modules/codec/jpeg.c
index 15a05afcfb..b7e38fbc75 100644
--- a/modules/codec/jpeg.c
+++ b/modules/codec/jpeg.c
@@ -177,6 +177,8 @@ static int OpenDecoder(vlc_object_t *p_this)
     /* Set callbacks */
     p_dec->pf_decode = DecodeBlock;
 
+    p_dec->fmt_out.i_codec = VLC_CODEC_RGB24;
+
     return VLC_SUCCESS;
 }
 
@@ -521,7 +523,6 @@ static int DecodeBlock(decoder_t *p_dec, block_t *p_block)
     jpeg_start_decompress(&p_sys->p_jpeg);
 
     /* Set output properties */
-    p_dec->fmt_out.i_codec = VLC_CODEC_RGB24;
     p_dec->fmt_out.video.i_visible_width  = p_dec->fmt_out.video.i_width  = p_sys->p_jpeg.output_width;
     p_dec->fmt_out.video.i_visible_height = p_dec->fmt_out.video.i_height = p_sys->p_jpeg.output_height;
     p_dec->fmt_out.video.i_sar_num = 1;



More information about the vlc-commits mailing list