GNOME Bugzilla – Bug 785941
fix flushing seek in rtmpsrc
Last modified: 2017-08-11 08:07:10 UTC
Created attachment 357106 [details] [review] rtmpsrc: implement unlock_stop() to fix flushing seek Previously this was broken, because a flushing seek causes unlock() to be called and in the implementation of unlock() we close the socket, so the seek errors out. This patch fixes it by re-connecting in unlock_stop(). Unfortunately, a seek does not work properly right after re-connecting, so a small hack is also in place: we read 1 buffer before seeking to allow librtmp to do its processing in RTMP_Read()
Comment on attachment 357106 [details] [review] rtmpsrc: implement unlock_stop() to fix flushing seek It would be better to reconnect in create() later, unlock_stop() should be more or less a no-op and not do any blocking network I/O
Created attachment 357175 [details] [review] rtmpsrc: fix flushing seek You are right, it looks cleaner this way.
commit f0500ec8b429b2ad44ac053982022f16296f51fd Author: George Kiagiadakis <george.kiagiadakis@collabora.com> Date: Mon Aug 7 14:25:26 2017 +0300 rtmpsrc: fix flushing seek Previously this was broken, because a flushing seek causes unlock() to be called and in the implementation of unlock() we close the socket, so the seek errors out. This patch fixes it by re-connecting before the seek. Unfortunately, a seek does not work properly right after re-connecting, so a small hack is also in place: we read 1 buffer before seeking to allow librtmp to do its processing in RTMP_Read() https://bugzilla.gnome.org/show_bug.cgi?id=785941