splitmuxsink: initialize mux_start_time properly
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>
Wed, 22 Jul 2015 15:45:12 +0000 (17:45 +0200)
committerJan Schmidt <jan@centricular.com>
Fri, 2 Oct 2015 14:43:34 +0000 (00:43 +1000)
commit56996fbe9c513500013ed39d903ebb7c29a499a1
tree73ffa14af6751b5aa5b45690e2dc12ab96472cef
parent2444ec03af52f692991e6143508a704a8c734962
splitmuxsink: initialize mux_start_time properly

mux_start_time refers to the running_time of the buffer
that goes first in the output file. Normally this time is
0, so this variable is initialized to 0 during the state
change to PAUSED.

However, when dealing with dynamic pipelines and starting
a recording while the pipeline has already run for a while,
the running_time of the first buffer is > 0 and this causes
a problem with detecting the end of the first file(s) when
splitting by duration, because the code will later compare
the threshold_time with (last buffer running_time - mux_start_time)
and will get it wrong until mux_start_time advances enough
to make this difference < threshold_time, creating empty files
in the meantime.

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