mkv: fixed broken locking mechanism
commit623bb996c6c13a231e3065a74d4233e4e00d0ec2
authorFilip Roséen <filip@videolabs.io>
Fri, 18 Mar 2016 18:30:02 +0000 (18 19:30 +0100)
committerJean-Baptiste Kempf <jb@videolan.org>
Fri, 18 Mar 2016 18:44:07 +0000 (18 19:44 +0100)
tree779c962005ea41e96f819e2debef476c250772e4
parentb578f8b725b435385d68a90a750fb91fc0c439ef
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 <jb@videolan.org>
modules/demux/mkv/mkv.cpp