[vlc-commits] transcode:video: clarify the fmt_out init value
Steve Lhomme
git at videolan.org
Fri Jul 21 13:25:45 CEST 2017
vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Mon Jul 17 09:30:58 2017 +0200| [b93a0d8af587ff55b2fda1c3b2c67da32079d228] | committer: Jean-Baptiste Kempf
transcode:video: clarify the fmt_out init value
no need to set the value 3 times
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b93a0d8af587ff55b2fda1c3b2c67da32079d228
---
modules/stream_out/transcode/video.c | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
index 6c9ad1265c..4d1bc0e0ea 100644
--- a/modules/stream_out/transcode/video.c
+++ b/modules/stream_out/transcode/video.c
@@ -360,12 +360,14 @@ static void transcode_video_filter_init( sout_stream_t *p_stream,
/* Take care of the scaling and chroma conversions. */
static void conversion_video_filter_append( sout_stream_id_sys_t *id )
{
- const es_format_t *p_fmt_out = &id->p_decoder->fmt_out;
- if( id->p_f_chain )
- p_fmt_out = filter_chain_GetFmtOut( id->p_f_chain );
-
+ const es_format_t *p_fmt_out;
if( id->p_uf_chain )
p_fmt_out = filter_chain_GetFmtOut( id->p_uf_chain );
+ else if( id->p_f_chain )
+ p_fmt_out = filter_chain_GetFmtOut( id->p_f_chain );
+ else
+ p_fmt_out = &id->p_decoder->fmt_out;
+
if( ( p_fmt_out->video.i_chroma != id->p_encoder->fmt_in.video.i_chroma ) ||
( p_fmt_out->video.i_width != id->p_encoder->fmt_in.video.i_width ) ||
@@ -584,13 +586,13 @@ static void transcode_video_sar_init( sout_stream_t *p_stream,
static void transcode_video_encoder_init( sout_stream_t *p_stream,
sout_stream_id_sys_t *id )
{
- const es_format_t *p_fmt_out = &id->p_decoder->fmt_out;
- if( id->p_f_chain ) {
- p_fmt_out = filter_chain_GetFmtOut( id->p_f_chain );
- }
- if( id->p_uf_chain ) {
+ const es_format_t *p_fmt_out;
+ if( id->p_uf_chain )
p_fmt_out = filter_chain_GetFmtOut( id->p_uf_chain );
- }
+ else if( id->p_f_chain )
+ p_fmt_out = filter_chain_GetFmtOut( id->p_f_chain );
+ else
+ p_fmt_out = &id->p_decoder->fmt_out;
id->p_encoder->fmt_in.video.orientation =
id->p_encoder->fmt_out.video.orientation =
More information about the vlc-commits
mailing list