[vlc-commits] [Git][videolan/vlc][master] demux: mpc: release the demuxer resources on exit
Steve Lhomme (@robUx4)
gitlab at videolan.org
Fri Apr 24 13:27:45 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
382296ba by Steve Lhomme at 2026-04-24T13:05:17+00:00
demux: mpc: release the demuxer resources on exit
Fixes #29686
- - - - -
1 changed file:
- modules/demux/mpc.c
Changes:
=====================================
modules/demux/mpc.c
=====================================
@@ -48,13 +48,14 @@
* Module descriptor
*****************************************************************************/
static int Open ( vlc_object_t * );
+static void Close ( vlc_object_t * );
vlc_module_begin ()
set_subcategory( SUBCAT_INPUT_DEMUX )
set_description( N_("MusePack demuxer") )
set_capability( "demux", 145 )
- set_callback( Open )
+ set_callbacks( Open, Close )
add_shortcut( "mpc" )
add_file_extension("mpc")
add_file_extension("mp+")
@@ -190,6 +191,17 @@ static int Open( vlc_object_t * p_this )
return VLC_SUCCESS;
}
+/*****************************************************************************
+ * Close: frees unused data
+ *****************************************************************************/
+static void Close( vlc_object_t * p_this )
+{
+ demux_t *p_demux = (demux_t*)p_this;
+ demux_sys_t *p_sys = p_demux->p_sys;
+
+ mpc_demux_exit( p_sys->decoder );
+}
+
/*****************************************************************************
* Demux:
*****************************************************************************
@@ -330,4 +342,3 @@ mpc_bool_t ReaderCanSeek(mpc_reader *p_private)
vlc_stream_Control( stream, STREAM_CAN_SEEK, &b_canseek );
return b_canseek;
}
-
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/382296ba4831110a64aa3cecee3921c08d2c0faf
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/382296ba4831110a64aa3cecee3921c08d2c0faf
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list