]> git.sesse.net Git - vlc/commit
decoder: fix data race in input_DecoderIsEmpty()
authorRémi Denis-Courmont <remi@remlab.net>
Tue, 17 Mar 2015 18:45:51 +0000 (20:45 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Tue, 17 Mar 2015 18:50:30 +0000 (20:50 +0200)
commit0fde3beaa85528e555bac9c1b327ba5a32da67e9
treef35c6e59ba6fe2688a4ada9d315e5a833b9a392e
parentd3d6c79c650f0ba831d217dcba4248bd16c78b2a
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.
src/input/decoder.c