vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Tue Mar 17 20:45:51 2015 +0200| [0fde3beaa85528e555bac9c1b327ba5a32da67e9] | committer: Rémi Denis-Courmont
decoder: fix data race in input_DecoderIsEmpty() p_dec->fmt_out is owned by the decoder plugin, and can only safely be accessed by the core from within decoder callbacks, notably the format update callbacks. Outside that context, p_owner->fmt has to be used. It contains a copy of p_dec->fmt_out at the last format update. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0fde3beaa85528e555bac9c1b327ba5a32da67e9 --- src/input/decoder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/input/decoder.c b/src/input/decoder.c index 3ccad9b..ad54288 100644 --- a/src/input/decoder.c +++ b/src/input/decoder.c @@ -382,9 +382,9 @@ bool input_DecoderIsEmpty( decoder_t * p_dec ) { vlc_mutex_lock( &p_owner->lock ); /* TODO subtitles support */ - if( p_dec->fmt_out.i_cat == VIDEO_ES && p_owner->p_vout ) + if( p_owner->fmt.i_cat == VIDEO_ES && p_owner->p_vout ) b_empty = vout_IsEmpty( p_owner->p_vout ); - else if( p_dec->fmt_out.i_cat == AUDIO_ES && p_owner->p_aout ) + else if( p_owner->fmt.i_cat == AUDIO_ES && p_owner->p_aout ) b_empty = aout_DecIsEmpty( p_owner->p_aout ); vlc_mutex_unlock( &p_owner->lock ); } _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
