[Bug 724757] basesrc: Ignores seek made when the last buffer is pushed

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Fri Feb 21 10:22:57 PST 2014


https://bugzilla.gnome.org/show_bug.cgi?id=724757
  GStreamer | gstreamer (core) | unspecified

--- Comment #3 from Thiago Sousa Santos <thiago.sousa.santos at collabora.co.uk> 2014-02-21 18:43:44 UTC ---
(In reply to comment #2)
> (From update of attachment 269742 [details])
> I'm surprised that the seeking from the streaming thread in the test works at
> all and does not deadlock ;)
> 
> Otherwise the change itself makes sense.

About locking on seeks/segment in basesrc:

1) I was checking locking in basesrc and it seems that there isn't much thread
safety around the segment for concurrent operations on the seeking and _loop
functions. With this patch I believe the only portion that needs locking is
around:

  switch (src->segment.format) {
    case GST_FORMAT_BYTES:
    {
      guint bufsize = gst_buffer_get_size (buf);

      /* we subtracted above for negative rates */
      if (src->segment.rate >= 0.0)
        position += bufsize;
      break;
    }

If the segment is changed we might advance the position on the new segment and
that can compromise the stream by EOS'ing early or position query.

2) Good question about doing seeking on the same thread, I wrote the patch
based on some experiments I was conducting with pushfilesrc ! oggdemux, but I'm
not sure why it works as the seeking function seems to need the pad stream
lock. Will try to understand this properly before pushing :)

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list