From fc94b78fe1421214ed087e1eae83f356021f9cc3 Mon Sep 17 00:00:00 2001 From: Mark Nauwelaerts Date: Wed, 4 May 2011 12:04:15 +0200 Subject: [PATCH] matroskamux: avoid building index when streamable ... as it will not be written anyway. Fixes #648937 (?). --- gst/matroska/matroska-mux.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gst/matroska/matroska-mux.c b/gst/matroska/matroska-mux.c index 7fcf943..7d2a8db 100644 --- a/gst/matroska/matroska-mux.c +++ b/gst/matroska/matroska-mux.c @@ -2711,9 +2711,10 @@ gst_matroska_mux_write_data (GstMatroskaMux * mux, GstMatroskaPad * collect_pad) * the block in the cluster which contains the timestamp, should also work * for files with multiple audio tracks. */ - if (is_video_keyframe || - ((collect_pad->track->type == GST_MATROSKA_TRACK_TYPE_AUDIO) && - (mux->num_streams == 1))) { + if (!mux->streamable && + (is_video_keyframe || + ((collect_pad->track->type == GST_MATROSKA_TRACK_TYPE_AUDIO) && + (mux->num_streams == 1)))) { gint last_idx = -1; if (mux->min_index_interval != 0) { -- 2.7.4