From ac56c1c3a78c72e209fdec3331954e93ceb7cd10 Mon Sep 17 00:00:00 2001 From: Michael Olbrich Date: Wed, 1 Jun 2016 11:02:12 +0200 Subject: [PATCH] tagdemux: preserve timestamp when skipping a tag at the beginning of a buffer gst_buffer_copy_region() does not copy the timestamp if it doesn't start with the first byte. We just skip the tag here, so the timestamp is still valid. https://bugzilla.gnome.org/show_bug.cgi?id=767173 --- gst-libs/gst/tag/gsttagdemux.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst-libs/gst/tag/gsttagdemux.c b/gst-libs/gst/tag/gsttagdemux.c index 41fdec330d..e9e7aa29a4 100644 --- a/gst-libs/gst/tag/gsttagdemux.c +++ b/gst-libs/gst/tag/gsttagdemux.c @@ -466,6 +466,8 @@ gst_tag_demux_trim_buffer (GstTagDemux * tagdemux, GstBuffer ** buf_ref, gst_buffer_copy_region (buf, GST_BUFFER_COPY_ALL, trim_start, out_size); g_return_val_if_fail (sub != NULL, FALSE); + if (GST_BUFFER_TIMESTAMP_IS_VALID (buf)) + GST_BUFFER_TIMESTAMP (sub) = GST_BUFFER_TIMESTAMP (buf); gst_buffer_unref (buf); *buf_ref = buf = sub; *buf_size = out_size;