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 609170 - basesrc pushes two newsegment
basesrc pushes two newsegment
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other All
: Normal normal
: 0.10.29
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-02-06 15:25 UTC by Jonas Holmberg
Modified: 2010-04-06 15:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Don't set close_segment in gst_base_src_new_seamless_segment() if first buffer has not been pushed yet (810 bytes, patch)
2010-02-06 15:25 UTC, Jonas Holmberg
none Details | Review
Fixed indentation (1.31 KB, patch)
2010-02-07 22:37 UTC, Jonas Holmberg
none Details | Review
Alternative patch (2.06 KB, patch)
2010-02-23 08:25 UTC, Jonas Holmberg
none Details | Review

Description Jonas Holmberg 2010-02-06 15:25:10 UTC
Created attachment 153139 [details] [review]
Don't set close_segment in gst_base_src_new_seamless_segment() if first buffer has not been pushed yet

If a src element calls gst_base_src_new_seamless_segment() from ::create() before the first buffer has been pushed, basesrc will push a newsegment with s->update = TRUE (this is the segment returned from ::do_seek()) before the "real" newsegment.
Comment 1 Jonas Holmberg 2010-02-07 22:37:08 UTC
Created attachment 153234 [details] [review]
Fixed indentation
Comment 2 Wim Taymans 2010-02-12 17:27:51 UTC
this patch is not quite ok, if you call the function twice before the segment is picked up by the loop function, it will not set the correct segment values the second time.

The initial empty segment should not really cause problems. Maybe a better check would be to see if we pushed a segment before and then only queue an update when we did.
Comment 3 Jonas Holmberg 2010-02-15 13:02:41 UTC
What use case makes it do the wrong thing?
Comment 4 Jonas Holmberg 2010-02-23 08:25:47 UTC
Created attachment 154480 [details] [review]
Alternative patch

Alternative solution with new private variable to keep track of pending newsegment.
Comment 5 Wim Taymans 2010-04-06 15:47:37 UTC
commit a120f9f4e6e5faa2a66bcd6476202766df4ecfc1
Author: Jonas Holmberg <jonas.holmberg@axis.com>
Date:   Tue Feb 23 09:16:55 2010 +0100

    basesrc: fix gst_base_src_new_seamless_segment()
    
    Keep track of pending newsegment in gst_base_src_new_seamless_segment()
    to avoid pushing newsegment update before newsegment.