[vlc-commits] transcode: do not write to const pointer
Rémi Denis-Courmont
git at videolan.org
Fri Jul 7 19:47:23 CEST 2017
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Jul 7 20:45:24 2017 +0300| [c62d874da1ee69ba3e767a1cffa60a7b2dbb2dad] | committer: Rémi Denis-Courmont
transcode: do not write to const pointer
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c62d874da1ee69ba3e767a1cffa60a7b2dbb2dad
---
modules/stream_out/transcode/video.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
index 50b21bc0ff..ec00e08acb 100644
--- a/modules/stream_out/transcode/video.c
+++ b/modules/stream_out/transcode/video.c
@@ -311,12 +311,18 @@ static void transcode_video_filter_init( sout_stream_t *p_stream,
.buffer_new = transcode_video_filter_buffer_new,
},
};
- es_format_t *p_fmt_out = &id->p_decoder->fmt_out;
+ const es_format_t *p_fmt_out = &id->p_decoder->fmt_out;
id->p_encoder->fmt_in.video.i_chroma = id->p_encoder->fmt_in.i_codec;
id->p_f_chain = filter_chain_NewVideo( p_stream, false, &owner );
filter_chain_Reset( id->p_f_chain, p_fmt_out, p_fmt_out );
+ /* Check that we have visible_width/height*/
+ if( !id->p_decoder->fmt_out.video.i_visible_height )
+ id->p_decoder->fmt_out.video.i_visible_height = id->p_decoder->fmt_out.video.i_height;
+ if( !id->p_decoder->fmt_out.video.i_visible_width )
+ id->p_decoder->fmt_out.video.i_visible_width = id->p_decoder->fmt_out.video.i_width;
+
/* Deinterlace */
if( p_stream->p_sys->psz_deinterlace != NULL )
{
@@ -339,12 +345,6 @@ static void transcode_video_filter_init( sout_stream_t *p_stream,
p_fmt_out = filter_chain_GetFmtOut( id->p_f_chain );
}
- /* Check that we have visible_width/height*/
- if( !p_fmt_out->video.i_visible_height )
- p_fmt_out->video.i_visible_height = p_fmt_out->video.i_height;
- if( !p_fmt_out->video.i_visible_width )
- p_fmt_out->video.i_visible_width = p_fmt_out->video.i_width;
-
if( p_stream->p_sys->psz_vf2 )
{
id->p_uf_chain = filter_chain_NewVideo( p_stream, true, &owner );
More information about the vlc-commits
mailing list