rtmpsrc: fix flushing seek
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>
Mon, 7 Aug 2017 11:25:26 +0000 (14:25 +0300)
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>
Tue, 8 Aug 2017 13:00:44 +0000 (16:00 +0300)
commitf0500ec8b429b2ad44ac053982022f16296f51fd
treeda4bafe27089ab1f2a01b0bcf871aa5596228115
parent74154c258f9d815ffa9a8fc7ef28775ef14e42b9
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
ext/rtmp/gstrtmpsrc.c