VLC stops playback after ACCESS_SET_SEEKPOINT
VLC immediately stops playback after a long seek caused by a seekpoint. Debug output:
access_vdr debug: ACCESS_SET_SEEKPOINT 3
access_vdr debug: seek to 1932541693
main debug: pre buffering
main debug: pre-buffering done 0 bytes in 0s - 0 kbytes/s
main debug: EOF reached
main debug: finished input
(access_vdr is a custom module I am working on. Here, Control(ACCESS_SET_SEEKPOINT) called Seek(1932541693) which updated p_access->info.i_pos. I can provide the source code if necessary.)
After some debugging, I suspect that the problem is within AStreamPrebufferStream in src/input/stream.c. It checks whether tk->i_end >= STREAM_CACHE_PREBUFFER_SIZE, but since tk->i_end was set to the new stream position (which is larger than the prebuffer size of 128), AStreamPrebufferStream never reads anything. This causes AStreamPeekStream to fail (no data means EOF), so the demux module and eventually the playback stop as well.
The problem exists at least in 1.0.3 and the current 1.1.0 (master). I've attached a small patch that "works for me".