summaryrefslogtreecommitdiffstats
path: root/gst/matroska/matroska-mux.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst/matroska/matroska-mux.c')
-rw-r--r--gst/matroska/matroska-mux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gst/matroska/matroska-mux.c b/gst/matroska/matroska-mux.c
index 098b2fc0..dd3fbd32 100644
--- a/gst/matroska/matroska-mux.c
+++ b/gst/matroska/matroska-mux.c
@@ -1972,7 +1972,7 @@ gst_matroska_mux_collected (GstCollectPads * pads, gpointer user_data)
else if (best->track->default_duration)
end_ts += best->track->default_duration;
- if (end_ts > best->end_ts)
+ if (!GST_CLOCK_TIME_IS_VALID (best->end_ts) || end_ts > best->end_ts)
best->end_ts = end_ts;
if (G_UNLIKELY (best->start_ts == GST_CLOCK_TIME_NONE ||