Bug 138425

Summary: [GStreamer] the webkitwebsrc element can stale
Product: WebKit Reporter: Xavier Claessens <xclaesse>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, pnormand
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Proposed patch
none
patch none

Description Xavier Claessens 2014-11-05 08:54:05 PST
When hlsdemux downloads next fragments, it will change source's state from PAUSE to READY, then change its uri, and change state back from READY to PAUSE. That state change is catched in WebKitWebSourceGStreamer::webKitWebSrcChangeState(). That sequence of events can happen:

1) pause->ready state change, priv->stopID is set to an idle cb ID that will call webKitWebSrcStop in main thread.
2) ready->pause state change, priv->startID is set to an idle cb ID that will call webKitWebSrcStart in main thread.
3) the main thread runs webKitWebSrcStop() that calls removeTimeoutSources() which remove priv->startID source.
And now webKitWebSrcStart will never be called, so it won't download anything.

So that happens when webkitwebsrc's state transition pause->ready->pause quickly.
Comment 1 Xavier Claessens 2014-11-05 08:54:40 PST
Note that shen souphttpsrc is used, it works correctly.
Comment 2 Xavier Claessens 2014-11-07 07:50:14 PST
Created attachment 241179 [details]
Proposed patch

I'm not sure what's the procedure to properly propose patches, but this one fix the issue for me.
Comment 3 Philippe Normand 2014-11-18 08:41:41 PST
You can find the contributor guidelines there: http://www.webkit.org/coding/contributing.html
Comment 4 Xavier Claessens 2014-12-11 13:54:25 PST
Created attachment 243145 [details]
patch

Patch updated to latest webkit master, with changelog. Is that all needed to get it reviewed?
Comment 5 Philippe Normand 2014-12-15 07:02:15 PST
Comment on attachment 243145 [details]
patch

Thanks!
Comment 6 WebKit Commit Bot 2014-12-15 07:37:23 PST
Comment on attachment 243145 [details]
patch

Clearing flags on attachment: 243145

Committed r177279: <http://trac.webkit.org/changeset/177279>
Comment 7 WebKit Commit Bot 2014-12-15 07:37:26 PST
All reviewed patches have been landed.  Closing bug.