After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 767791 - tagdemux: preserve duration when skipping a tag at the beginning of a buffer
tagdemux: preserve duration when skipping a tag at the beginning of a buffer
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 1.9.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-06-17 13:18 UTC by Michael Olbrich
Modified: 2016-06-21 07:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (1.12 KB, patch)
2016-06-17 13:18 UTC, Michael Olbrich
none Details | Review
patch (1.12 KB, patch)
2016-06-17 13:53 UTC, Michael Olbrich
committed Details | Review

Description Michael Olbrich 2016-06-17 13:18:22 UTC
Created attachment 329954 [details] [review]
patch

gst_buffer_copy_region() does not copy the duration if it doesn't start
with the first byte. We just skip the tag here, so the duration is still
valid.

This is like #767173, just for the duration instead of the timestamp.
Comment 1 Sebastian Dröge (slomo) 2016-06-17 13:20:47 UTC
Review of attachment 329954 [details] [review]:

::: gst-libs/gst/tag/gsttagdemux.c
@@ +470,3 @@
         GST_BUFFER_TIMESTAMP (sub) = GST_BUFFER_TIMESTAMP (buf);
+      if (GST_BUFFER_DURATION_IS_VALID (buf))
+        GST_BUFFER_DURATION (sub) += GST_BUFFER_DURATION (buf);

Shouldn't this be = instead of += ?
Comment 2 Michael Olbrich 2016-06-17 13:53:24 UTC
Created attachment 329959 [details] [review]
patch

Yes, of course. I've updated the patch to fix this.
Comment 3 Sebastian Dröge (slomo) 2016-06-21 07:44:42 UTC
commit 72879c3639f608be526359727e53f0e99d095e65
Author: Michael Olbrich <m.olbrich@pengutronix.de>
Date:   Fri Jun 17 15:11:20 2016 +0200

    tagdemux: preserve duration when skipping a tag at the beginning of a buffer
    
    gst_buffer_copy_region() does not copy the duration if it doesn't start
    with the first byte. We just skip the tag here, so the duration is still
    valid.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=767791