matroskamux: Always write a tags element into seekhead
authorJan Schmidt <jan@centricular.com>
Thu, 1 Jul 2021 15:41:05 +0000 (01:41 +1000)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 2 Jul 2021 07:45:07 +0000 (07:45 +0000)
If there are only stream tags, we still want to write the
tags entry into the seekhead, so that tags can be found
quickly in the player.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/905

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1020>

gst/matroska/matroska-mux.c

index 48f24fd..1d003b4 100644 (file)
@@ -3593,7 +3593,7 @@ gst_matroska_mux_finish (GstMatroskaMux * mux)
     gst_ebml_write_seek (ebml, my_pos);
   }
 
-  if (tags != NULL || toc_has_tags) {
+  if (mux->tags_pos != 0 || toc_has_tags) {
     gst_ebml_replace_uint (ebml, mux->seekhead_pos + 144,
         mux->tags_pos - mux->segment_master);
   } else {