[vlc-devel] [PATCH] codec:jpeg: set the fmt_out.i_codec early
Steve Lhomme
robux4 at videolabs.io
Wed Jul 19 15:30:04 CEST 2017
---
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;
--
2.12.1
More information about the vlc-devel
mailing list