GNOME Bugzilla – Bug 609170
basesrc pushes two newsegment
Last modified: 2010-04-06 15:47:37 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.
Created attachment 153234 [details] [review] Fixed indentation
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.
What use case makes it do the wrong thing?
Created attachment 154480 [details] [review] Alternative patch Alternative solution with new private variable to keep track of pending newsegment.
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.