vlc-2.2.4-decoder-lock-scope.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. 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
  2. --- a/src/input/decoder.c
  3. +++ b/src/input/decoder.c
  4. @@ -1162,7 +1162,10 @@
  5. b_paused = p_owner->b_paused;
  6. if (!p_audio)
  7. + {
  8. + vlc_mutex_unlock( &p_owner->lock );
  9. break;
  10. + }
  11. /* */
  12. int i_rate = INPUT_RATE_DEFAULT;
  13. @@ -1180,6 +1183,9 @@
  14. if( unlikely(p_owner->b_paused != b_paused) )
  15. continue; /* race with input thread? retry... */
  16. +
  17. + vlc_mutex_unlock( &p_owner->lock );
  18. +
  19. if( p_aout == NULL )
  20. b_reject = true;
  21. @@ -1199,7 +1205,6 @@
  22. break;
  23. }
  24. - vlc_mutex_unlock( &p_owner->lock );
  25. }
  26. static void DecoderDecodeAudio( decoder_t *p_dec, block_t *p_block )
  27. @@ -1961,11 +1966,10 @@
  28. /* Parameters changed, restart the aout */
  29. vlc_mutex_lock( &p_owner->lock );
  30. -
  31. - aout_DecDelete( p_owner->p_aout );
  32. p_owner->p_aout = NULL;
  33. -
  34. vlc_mutex_unlock( &p_owner->lock );
  35. + aout_DecDelete( p_owner->p_aout );
  36. +
  37. input_resource_PutAout( p_owner->p_resource, p_aout );
  38. }