diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2018-02-28 19:21:53 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2018-02-28 19:21:53 +0200 |
commit | 80d5c43a8108a3769c27e35117f51dde5135cd1d (patch) | |
tree | ebd1dbec99c54396d5b53e54d848df7292757819 | |
parent | 15ae79838caa6ee9494bece791b5221b9696c41a (diff) |
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 78cffe88c..0d129fca4 100644 --- a/gst/matroska/matroska-mux.c +++ b/gst/matroska/matroska-mux.c @@ -3752,7 +3752,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); |