splitmuxsink: Take released-but-not-yet-output bytes into account
authorJan Schmidt <jan@centricular.com>
Thu, 11 Jun 2015 03:36:54 +0000 (13:36 +1000)
committerJan Schmidt <jan@centricular.com>
Thu, 11 Jun 2015 15:57:36 +0000 (01:57 +1000)
commit3f39d06338141c0d7d2c1e185d71cc276d705422
tree49babd58cd57caf0ec5175d245a02600c5f68209
parent03f1a2ea677e2f535e7366b05420a7e0feb1dea9
splitmuxsink: Take released-but-not-yet-output bytes into account

When deciding whether it's time to switch to a new file, take into
account data that's been released for pushing, but hasn't yet
been pushed - because downstream is slow or the threads haven't been
scheduled.

Fixes a race in the unit test and probably in practice - sometimes
failing to switch when it should for an extra GOP or two.

Also fix a problem in splitmuxsrc where playback sometimes
stalls at startup if types are found too quickly.

https://bugzilla.gnome.org/show_bug.cgi?id=750747
gst/multifile/gstsplitmuxpartreader.c
gst/multifile/gstsplitmuxsink.c
gst/multifile/gstsplitmuxsink.h