transcode: destroy the mutex and condition only if they have been initialized.
commit69477405985aa366b68dfd86356ce69c43c3aeb6
authorAdrien Maglo <magsoft@videolan.org>
Tue, 1 Mar 2016 16:40:48 +0000 (1 17:40 +0100)
committerThomas Guillem <thomas@gllm.fr>
Wed, 2 Mar 2016 07:47:05 +0000 (2 08:47 +0100)
tree3c23e260a3a8a05d45b3fdc46f965c93809abadb
parent4f5af4a46acee0560ecc1946bf0649f923ba59e9
transcode: destroy the mutex and condition only if they have been initialized.

If i_threads == 0, both are not initialized as the function transcode_video_new
returns before the call to vlc_mutex_init and vlc_cond_init.

This patch fixes a deadlock on vlc_cond_destroy called with an uninitialized
condition variable argument.

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
modules/stream_out/transcode/video.c