[vlc-commits] transcode: init encoder first, so we get end resolution
Ilkka Ollakka
git at videolan.org
Sun Feb 5 13:15:05 CET 2017
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Wed Oct 26 21:11:00 2016 +0300| [f8beff3c9de24e984046b6f93b8690c03f938d6a] | committer: Ilkka Ollakka
transcode: init encoder first, so we get end resolution
As encoder_init does rounding or resolution and all, we can easily end
up in case where videofilter_init add scaling filter and encoder_init
adds another scaler to get even resolution.
Doing init this way, we have wanted output initialized and we just want
to find needed filters between input and output.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f8beff3c9de24e984046b6f93b8690c03f938d6a
---
modules/stream_out/transcode/video.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
index 0186684..0544713 100644
--- a/modules/stream_out/transcode/video.c
+++ b/modules/stream_out/transcode/video.c
@@ -808,8 +808,8 @@ int transcode_video_process( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
id->p_encoder->fmt_out.video.i_visible_height = p_sys->i_height & ~1;
id->p_encoder->fmt_out.video.i_sar_num = id->p_encoder->fmt_out.video.i_sar_den = 0;
- transcode_video_filter_init( p_stream, id );
transcode_video_encoder_init( p_stream, id );
+ transcode_video_filter_init( p_stream, id );
conversion_video_filter_append( id );
memcpy( &id->fmt_input_video, &id->p_decoder->fmt_out.video, sizeof(video_format_t));
}
@@ -823,8 +823,8 @@ int transcode_video_process( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
filter_chain_Delete( id->p_uf_chain );
id->p_f_chain = id->p_uf_chain = NULL;
- transcode_video_filter_init( p_stream, id );
transcode_video_encoder_init( p_stream, id );
+ transcode_video_filter_init( p_stream, id );
conversion_video_filter_append( id );
memcpy( &id->fmt_input_video, &id->p_decoder->fmt_out.video, sizeof(video_format_t));
More information about the vlc-commits
mailing list