[vlc-devel] [PATCH 13/34] filter_chain: set NULL on AppendConverter when value is implied by previous call
Steve Lhomme
robux4 at ycbcr.xyz
Fri Nov 8 15:40:17 CET 2019
Either because Reset() set the same input value or the we're using the same
value set by the previous AppendXXX().
---
modules/stream_out/sdi/SDIStream.cpp | 2 +-
modules/stream_out/transcode/video.c | 4 ++--
modules/video_chroma/chain.c | 2 +-
src/video_output/display.c | 2 +-
src/video_output/video_output.c | 4 ++--
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/modules/stream_out/sdi/SDIStream.cpp b/modules/stream_out/sdi/SDIStream.cpp
index dcd054758d6..a87c9106434 100644
--- a/modules/stream_out/sdi/SDIStream.cpp
+++ b/modules/stream_out/sdi/SDIStream.cpp
@@ -545,7 +545,7 @@ filter_chain_t * VideoDecodedStream::VideoFilterCreate(const es_format_t *p_srcf
if(p_srcfmt->video.i_chroma != requestedoutput.video.i_chroma)
{
- if(filter_chain_AppendConverter(p_chain, p_srcfmt, &requestedoutput) != VLC_SUCCESS)
+ if(filter_chain_AppendConverter(p_chain, NULL, &requestedoutput) != VLC_SUCCESS)
{
filter_chain_Delete(p_chain);
return NULL;
diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
index 0b2362f7b6f..27da7764c18 100644
--- a/modules/stream_out/transcode/video.c
+++ b/modules/stream_out/transcode/video.c
@@ -111,7 +111,7 @@ static int video_update_format_decoder( decoder_t *p_dec, vlc_video_context *vct
test_chain = filter_chain_NewVideo( p_obj, false, NULL );
filter_chain_Reset( test_chain, &p_dec->fmt_out, &p_dec->fmt_out );
- int chain_works = filter_chain_AppendConverter( test_chain, &p_dec->fmt_out, p_enc_in );
+ int chain_works = filter_chain_AppendConverter( test_chain, NULL, p_enc_in );
filter_chain_Delete( test_chain );
msg_Dbg( p_obj, "Filter chain testing done, input chroma %4.4s seems to be %s for transcode",
@@ -300,7 +300,7 @@ static int transcode_video_set_conversions( sout_stream_t *p_stream,
return VLC_EGENERIC;
filter_chain_Reset( *pp_chain, *pp_src, p_tmpdst );
- if( filter_chain_AppendConverter( *pp_chain, *pp_src, p_tmpdst ) != VLC_SUCCESS )
+ if( filter_chain_AppendConverter( *pp_chain, NULL, p_tmpdst ) != VLC_SUCCESS )
return VLC_EGENERIC;
*pp_src = filter_chain_GetFmtOut( *pp_chain );
diff --git a/modules/video_chroma/chain.c b/modules/video_chroma/chain.c
index f87e30a4aaa..1f396ffa4b3 100644
--- a/modules/video_chroma/chain.c
+++ b/modules/video_chroma/chain.c
@@ -449,7 +449,7 @@ static int CreateChain( filter_t *p_filter, const es_format_t *p_fmt_mid )
else
{
if( filter_chain_AppendConverter( p_sys->p_chain,
- p_fmt_mid, &p_filter->fmt_out ) )
+ NULL, &p_filter->fmt_out ) )
goto error;
}
return VLC_SUCCESS;
diff --git a/src/video_output/display.c b/src/video_output/display.c
index 2b663595ae0..de55c48348c 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -338,7 +338,7 @@ static int VoutDisplayCreateRender(vout_display_t *vd)
es_format_InitFromVideo(&dst, i == 0 ? &v_dst : &v_dst_cmp);
filter_chain_Reset(osys->converters, &src, &dst);
- ret = filter_chain_AppendConverter(osys->converters, &src, &dst);
+ ret = filter_chain_AppendConverter(osys->converters, NULL, &dst);
es_format_Clean(&dst);
if (ret == 0)
break;
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 347ac1cf459..e4e8eb5220a 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -850,7 +850,7 @@ static void ThreadChangeFilters(vout_thread_t *vout,
if (!es_format_IsSimilar(p_fmt_current, &fmt_target)) {
msg_Dbg(vout, "Adding a filter to compensate for format changes");
if (filter_chain_AppendConverter(vout->p->filter.chain_interactive,
- p_fmt_current, &fmt_target) != 0) {
+ NULL, &fmt_target) != 0) {
msg_Err(vout, "Failed to compensate for the format changes, removing all filters");
ThreadDelAllFilterCallbacks(vout);
filter_chain_Reset(vout->p->filter.chain_static, &fmt_target, &fmt_target);
@@ -983,7 +983,7 @@ static picture_t *ConvertRGB32AndBlend(vout_thread_t *vout, picture_t *pic,
filter_chain_Reset(filterc, &src, &dst);
- if (filter_chain_AppendConverter(filterc, &src, &dst) != 0)
+ if (filter_chain_AppendConverter(filterc, NULL, &dst) != 0)
{
filter_chain_Delete(filterc);
return NULL;
--
2.17.1
More information about the vlc-devel
mailing list