Skip to content

Commit 623bb99

Browse files
Filip Roséenjbkempf
Filip Roséen
authored andcommitted
mkv: fixed broken locking mechanism
A temporary object (ie. an object without a name) is created in the expression in which it is introduced, and destroyed immediately after. This means that the previous code did not lock p_sys->lock_demuxer for the remaining duration of the function "Demux", but instead _only_ during the expression in which the temporary "vlc_mutex_locker" was constructed (ie. the locking and unlocking happened on that line). This patch fixes the issue by giving the previously unnamed object a name (binding its lifetime to the current scope). Signed-off-by: Jean-Baptiste Kempf <[email protected]>
1 parent b578f8b commit 623bb99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/demux/mkv/mkv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ static int Demux( demux_t *p_demux)
710710
{
711711
demux_sys_t *p_sys = p_demux->p_sys;
712712

713-
vlc_mutex_locker( &p_sys->lock_demuxer );
713+
vlc_mutex_locker demux_lock ( &p_sys->lock_demuxer );
714714

715715
virtual_segment_c *p_vsegment = p_sys->p_current_vsegment;
716716

0 commit comments

Comments
 (0)