diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2018-02-28 19:21:53 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2018-03-13 16:04:17 +0200 |
commit | b4ad5d8dc30a1cbb4b70a759765bcce147260d59 (patch) | |
tree | 4364a977c1738e396f2b49d5216e7e44d6ce9c52 | |
parent | 3d8ea05193d61111e6593c2aed9b7f81e3b26223 (diff) | |
download | gstreamer-plugins-good-b4ad5d8dc30a1cbb4b70a759765bcce147260d59.tar.gz |
matroskamux: Only mark new clusters as keyframe if they start on a keyframe or we're muxing only audio
Based on a patch by Nicola Murino <nicola.murino@gmail.com>
https://bugzilla.gnome.org/show_bug.cgi?id=792775
-rw-r--r-- | gst/matroska/matroska-mux.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gst/matroska/matroska-mux.c b/gst/matroska/matroska-mux.c index 6af282bbc..50c4d45f5 100644 --- a/gst/matroska/matroska-mux.c +++ b/gst/matroska/matroska-mux.c @@ -3674,7 +3674,8 @@ gst_matroska_mux_write_data (GstMatroskaMux * mux, GstMatroskaPad * collect_pad, gst_util_uint64_scale (buffer_timestamp, 1, mux->time_scale)); GST_LOG_OBJECT (mux, "cluster timestamp %" G_GUINT64_FORMAT, gst_util_uint64_scale (buffer_timestamp, 1, mux->time_scale)); - gst_ebml_write_flush_cache (ebml, TRUE, buffer_timestamp); + gst_ebml_write_flush_cache (ebml, is_video_keyframe + || is_audio_only, buffer_timestamp); mux->cluster_time = buffer_timestamp; gst_ebml_write_uint (ebml, GST_MATROSKA_ID_PREVSIZE, mux->prev_cluster_size); |