[vlc-devel] [PATCH 2/2] filters: use filter_Flush() instead of accessing the callback directly
Steve Lhomme
robux4 at ycbcr.xyz
Mon Oct 12 16:16:47 CEST 2020
It's easier to find out who flushes filters and when.
It's also easier to reorder the code without having the Flush callback above a
lot of common code.
The di_flush call in MMAL passthrough mode was probably wrong.
---
modules/audio_filter/converter/tospdif.c | 4 ++--
modules/hw/mmal/converter.c | 2 +-
modules/hw/mmal/deinterlace.c | 2 +-
modules/hw/vdpau/chroma.c | 2 +-
modules/video_filter/deinterlace/deinterlace.c | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/modules/audio_filter/converter/tospdif.c b/modules/audio_filter/converter/tospdif.c
index 5b0e2df8fc3..c232707af6b 100644
--- a/modules/audio_filter/converter/tospdif.c
+++ b/modules/audio_filter/converter/tospdif.c
@@ -588,7 +588,7 @@ static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf )
case SPDIF_MORE_DATA:
break;
case SPDIF_ERROR:
- Flush( p_filter );
+ filter_Flush( p_filter );
break;
}
@@ -598,7 +598,7 @@ static block_t *DoWork( filter_t *p_filter, block_t *p_in_buf )
static void Close( filter_t *p_filter )
{
- Flush( p_filter );
+ filter_Flush( p_filter );
free( p_filter->p_sys );
}
diff --git a/modules/hw/mmal/converter.c b/modules/hw/mmal/converter.c
index 872ffe48921..4059e1504e7 100644
--- a/modules/hw/mmal/converter.c
+++ b/modules/hw/mmal/converter.c
@@ -711,7 +711,7 @@ fail:
mmal_buffer_header_release(out_buf);
if (p_pic != NULL)
picture_Release(p_pic);
- conv_flush(p_filter);
+ filter_Flush(p_filter);
return NULL;
}
diff --git a/modules/hw/mmal/deinterlace.c b/modules/hw/mmal/deinterlace.c
index e70def780b6..0d94e034812 100644
--- a/modules/hw/mmal/deinterlace.c
+++ b/modules/hw/mmal/deinterlace.c
@@ -374,7 +374,7 @@ static void CloseMmalDeinterlace(filter_t *filter)
return;
}
- di_flush(filter);
+ filter_Flush(filter);
if (sys->component && sys->component->control->is_enabled)
mmal_port_disable(sys->component->control);
diff --git a/modules/hw/vdpau/chroma.c b/modules/hw/vdpau/chroma.c
index 17a26c0a49a..415e8b77ea4 100644
--- a/modules/hw/vdpau/chroma.c
+++ b/modules/hw/vdpau/chroma.c
@@ -747,7 +747,7 @@ static void OutputClose(filter_t *filter)
{
vlc_vdp_mixer_t *sys = filter->p_sys;
- Flush(filter);
+ filter_Flush(filter);
vdp_video_mixer_destroy(sys->vdp, sys->mixer);
picture_pool_Release(sys->pool);
vlc_video_context_Release(filter->vctx_out);
diff --git a/modules/video_filter/deinterlace/deinterlace.c b/modules/video_filter/deinterlace/deinterlace.c
index 62bd077c0a2..a0e8b8d8090 100644
--- a/modules/video_filter/deinterlace/deinterlace.c
+++ b/modules/video_filter/deinterlace/deinterlace.c
@@ -480,7 +480,7 @@ int Mouse( filter_t *p_filter,
*/
static void Close( filter_t *p_filter )
{
- Flush( p_filter );
+ filter_Flush( p_filter );
free( p_filter->p_sys );
}
--
2.26.2
More information about the vlc-devel
mailing list