void-packages/srcpkgs/vlc/patches/vlc-2.2.6-decoder-lock-scop...

35 lines
969 B
Diff
Raw Normal View History

X-Git-Url: https://git.videolan.org/?p=vlc.git;a=blobdiff_plain;f=src%2Finput%2Fdecoder.c;h=fe3cd428c65c18bfbdadb55baf11521afdc2bfc7;hp=83aa5bf54e2c29ad93fae803117558e4fcd0f658;hb=6ae2905ef7fbc7de3a3a4a1bdf8ad6df46ce570a;hpb=5b2de76965ee8b1ab5e3257f8b6d71bbb4e9e3f9
--- src/input/decoder.c
+++ src/input/decoder.c
@@ -1162,7 +1162,10 @@
b_paused = p_owner->b_paused;
if (!p_audio)
+ {
+ vlc_mutex_unlock( &p_owner->lock );
break;
+ }
/* */
int i_rate = INPUT_RATE_DEFAULT;
@@ -1180,6 +1183,9 @@
if( unlikely(p_owner->b_paused != b_paused) )
continue; /* race with input thread? retry... */
+
+ vlc_mutex_unlock( &p_owner->lock );
+
if( p_aout == NULL )
b_reject = true;
@@ -1199,7 +1205,6 @@
break;
}
- vlc_mutex_unlock( &p_owner->lock );
}
static void DecoderDecodeAudio( decoder_t *p_dec, block_t *p_block )