[vlc-commits] mosaic_bridge: use a function to release the decoder
Steve Lhomme
git at videolan.org
Mon Dec 9 11:51:07 CET 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Jul 9 09:02:51 2019 +0200| [c17727bbe0fccd7e79cb1d9bd3b8839dcfceec62] | committer: Steve Lhomme
mosaic_bridge: use a function to release the decoder
We may have to release resources associated to the decoder, like the decoder
device.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c17727bbe0fccd7e79cb1d9bd3b8839dcfceec62
---
modules/stream_out/mosaic_bridge.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/modules/stream_out/mosaic_bridge.c b/modules/stream_out/mosaic_bridge.c
index df9189aeb8..948b9f8ca5 100644
--- a/modules/stream_out/mosaic_bridge.c
+++ b/modules/stream_out/mosaic_bridge.c
@@ -271,6 +271,11 @@ static void Close( vlc_object_t * p_this )
free( p_sys );
}
+static void ReleaseDecoder( decoder_t *p_dec )
+{
+ decoder_Destroy( p_dec );
+}
+
static void *Add( sout_stream_t *p_stream, const es_format_t *p_fmt )
{
sout_stream_sys_t *p_sys = p_stream->p_sys;
@@ -336,7 +341,7 @@ static void *Add( sout_stream_t *p_stream, const es_format_t *p_fmt )
if( !p_sys->p_decoder->p_module )
{
msg_Err( p_stream, "cannot find decoder" );
- decoder_Destroy( p_sys->p_decoder );
+ ReleaseDecoder( p_sys->p_decoder );
return NULL;
}
@@ -413,7 +418,7 @@ static void Del( sout_stream_t *p_stream, void *id )
if( !p_sys->b_inited )
return;
- decoder_Destroy( p_sys->p_decoder );
+ ReleaseDecoder( p_sys->p_decoder );
/* Destroy user specified video filters */
if( p_sys->p_vf2 )
More information about the vlc-commits
mailing list