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 614016 - [baseparse] NEWSEGMENT event sent with wrong start and position time
[baseparse] NEWSEGMENT event sent with wrong start and position time
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Windows
: Normal critical
: 0.10.19
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-03-26 14:18 UTC by Josh Doe
Modified: 2010-03-26 17:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix for NEWSEGMENT bug in GstBaseParse (2.02 KB, patch)
2010-03-26 14:18 UTC, Josh Doe
committed Details | Review

Description Josh Doe 2010-03-26 14:18:47 UTC
Created attachment 157173 [details] [review]
Fix for NEWSEGMENT bug in GstBaseParse

GstBaseParse from audioparsers (aacparse, ac3parse, amrparse, flacparse) sends the wrong start and position time to the NEWSEGMENT event.

In my case, where I've derived a video parser from GstBaseParse, this causes the first frame of video to be dropped by filesink:

gst-launch filesrc location=video.ext ! extparse ! filesink location=output.raw

I've attached a patch which fixes this bug, at least for me. Please review it though as I am fairly new to GStreamer and don't fully understand segments and events yet.
Comment 1 Sebastian Dröge (slomo) 2010-03-26 17:21:09 UTC
commit 6663e7c1caaa90aa63fef5a8d293cc9fdab3b071
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Fri Mar 26 18:20:24 2010 +0100

    baseparse: Set the last stop to the buffer starttime if the duration is inva
    
    ...instead of not setting it at all.

commit af00e5952837eeb4bc4975fe3d5667686f93e7ae
Author: Joshua M. Doe <josh@joshdoe.com>
Date:   Fri Mar 26 18:19:00 2010 +0100

    baseparse: Send NEWSEGMENT event with correct start and position
    
    Instead of taking the last stop (which could be buffer endtime instead
    of starttime) always take the buffer starttime.
    
    Fixes bug #614016.