[vlc-devel] [RFC-PATCH 04/12] core: introduce input_Decoder{Set, Get}PrerollEnd

Filip Roséen filip at videolabs.io
Wed May 11 20:24:05 CEST 2016


> I know the problem predates (by very long) this patch. But at least, it is 
> currently contained. I don´t think we should expose a fundamentally broken 
> API.

I just understood a little better what you mean, but just for clarification: you
do not like the helpers because they would allow things other than code in
decoder.c to access the i_preroll_end?

I guess I could submit a patch that handles this through some sort of
indirection, though the major issues is that we need to propagate the preroll
end timestamp from es_out.c to decoder.c in some way or another in order to have
the decoders react appropriately to the preroll itself.

Maybe one could establish a "could you please do X" relationship between the es
and the underlying decoder, instead of the es unconditionally updating the
value.

It would mean added complexity, but it would also be more correct.


Immediate fix
-------------

Though, one fix to the immediate issue would be to update DecoderPrerollBlock
(which is introduced in a later patch), so that there is no chance for someone
to update the preroll-end timestamp between the functions call to
input_DecoderGetPrerollEnd and input_DecoderSetPrerollEnd(..., VLC_TS_INVALID ).

Because that is the only code-path where it would be problematic with an
intermediate write.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20160511/fe3e6b7c/attachment.html>


More information about the vlc-devel mailing list