spitmuxsink: Avoid creating small file at EOS

When EOS is reached, the current file get closed and the last
GOP in the mq was written in a new file.

https://bugzilla.gnome.org/show_bug.cgi?id=765072
This commit is contained in:
Xavier Claessens 2016-04-15 10:44:02 -04:00 committed by Jan Schmidt
parent 2dee0e385f
commit 7886e8d8a0

View file

@ -834,7 +834,6 @@ handle_gathered_gop (GstSplitMuxSink * splitmux)
GList *cur;
gsize queued_bytes = 0;
GstClockTime queued_time = 0;
gboolean at_eos = TRUE;
/* Assess if the multiqueue contents overflowed the current file */
for (cur = g_list_first (splitmux->contexts);
@ -843,7 +842,6 @@ handle_gathered_gop (GstSplitMuxSink * splitmux)
if (tmpctx->in_running_time > queued_time)
queued_time = tmpctx->in_running_time;
queued_bytes += tmpctx->in_bytes;
at_eos &= tmpctx->in_eos;
}
g_assert (queued_bytes >= splitmux->mux_start_bytes);
@ -864,7 +862,7 @@ handle_gathered_gop (GstSplitMuxSink * splitmux)
((splitmux->threshold_bytes > 0 &&
queued_bytes >= splitmux->threshold_bytes) ||
(splitmux->threshold_time > 0 &&
queued_time >= splitmux->threshold_time))) || at_eos) {
queued_time >= splitmux->threshold_time)))) {
splitmux->state = SPLITMUX_STATE_ENDING_FILE;