[vlc-devel] [PATCH 0/3] Fixing input/decoder/sout deadlock with chromecast

Thomas Guillem thomas at gllm.fr
Mon Feb 12 18:13:23 CET 2018


A lot of users report that Chromecast is not working for their configuration.
Indeed, some Chromecast devices need to be feed with one minute of data. Since
VLC is buffering 300ms of data by default, you'll have to wait 59.7 sec to
start playback on some chromecast devices.

What is the link with these 3 core patches ?

I'll need the CC demux filter to ask for a long PTS DELAY: 60sec. The problem
is that we can't really have 1min of data in a FIFO (I have a 30 seconds sample
that is 1.5GB for example). So I'll have to wait from the CC sout pf_send
callback for the httpd fifo to be emptied. If I add a wait, I'll obviously need
to be able to interrupt it (patches 2 and 3).

With these 3 patches, I'm able to have a very small FIFO for the httpd server
(less than one MB) and I can remove the setPacing() HACK that requested
demux_filter to pace from the sout. This previous HACK couldn't really work in
all conditions. Indeed, sout and demux_filters are on different thread, in some
case, you could get 100MB of data after telling the demux filter to wait.

I'm sorry, I didn't see this issue coming and the changes are quite heavy (but
mainly for the sout case). I would like to backport these 3 patches to 3.0 (if


Thomas Guillem (3):
  decoder: unblock input thread when interrupted
  sout: add an interrupt context
  decoder: interrupt the input sout when deleted

 src/input/decoder.c               | 58 +++++++++++++++++++++++++++++++--------
 src/stream_output/stream_output.c | 15 ++++++++++
 src/stream_output/stream_output.h |  3 ++
 3 files changed, 65 insertions(+), 11 deletions(-)


More information about the vlc-devel mailing list