Bug 111888

Summary: [GStreamer] Seeking related data corruption and broken offset handling in WebKitWebSrc
Product: WebKit Reporter: Sebastian Dröge (slomo) <slomo>
Component: MediaAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Major CC: gustavo, menard, mrobinson, pnormand, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Fix offset handling in GStreamer WebKitWebSource
none
Fix offset handling in GStreamer WebKitWebSource none

Description Sebastian Dröge (slomo) 2013-03-08 14:15:42 PST
Hi,

there's potential seeking related data corruption in WebKitWebSrc, see this gst-plugins-good commit for an explanation:
http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/ext/soup/gstsouphttpsrc.c?id=95f6e0dbe440cc0399a54221d672f11e4e1d6ee8

The code in WebKitWebSrc is doing basically the same and attached patch fixes it in the same way
Comment 1 Sebastian Dröge (slomo) 2013-03-08 15:42:22 PST
Created attachment 192298 [details]
Fix offset handling in GStreamer WebKitWebSource

Also the offset handling was completely broken after a seek (offsets were starting at 0 again instead of the seek position), this patch fixes it now.
Comment 2 Sebastian Dröge (slomo) 2013-03-08 16:05:03 PST
Created attachment 192301 [details]
Fix offset handling in GStreamer WebKitWebSource
Comment 3 Sebastian Dröge (slomo) 2013-03-09 00:37:40 PST
I should mention that this also causes these warnings in the GStreamer debug logs:

0:00:00.799966750 32616   0x1d4600 WARN                  queue2 gstqueue2.c:1610:gst_queue2_create_write:<queue2-0> buffer offset does not match current writing position! 0 != 99761158
0:00:00.814100750 32616   0x1d4600 WARN                  queue2 gstqueue2.c:1610:gst_queue2_create_write:<queue2-0> buffer offset does not match current writing position! 11154 != 99772312
0:00:00.818346833 32616   0x1d4600 WARN                  queue2 gstqueue2.c:1610:gst_queue2_create_write:<queue2-0> buffer offset does not match current writing position! 14050 != 99775208
0:00:00.827516708 32616   0x1d4600 WARN                  queue2 gstqueue2.c:1610:gst_queue2_create_write:<queue2-0> buffer offset does not match current writing position! 32874 != 99794032
0:00:00.835650083 32616   0x1d4600 WARN                  queue2 gstqueue2.c:1610:gst_queue2_create_write:<queue2-0> buffer offset does not match current writing position! 35770 != 99796928
0:00:00.851485041 32616   0x1d4600 WARN                  queue2 gstqueue2.c:1610:gst_queue2_create_write:<queue2-0> buffer offset does not match current writing position! 40114 != 99801272
0:00:00.856966208 32616   0x1d4600 WARN                  queue2 gstqueue2.c:1610:gst_queue2_create_write:<queue2-0> buffer offset does not match current writing position! 48802 != 99809960
0:00:00.867456083 32616   0x1d4600 WARN                  queue2 gstqueue2.c:1610:gst_queue2_create_write:<queue2-0> buffer offset does not match current writing position! 51698 != 99812856
0:00:00.871585125 32616   0x1d4600 WARN                  queue2 gstqueue2.c:1610:gst_queue2_create_write:<queue2-0> buffer offset does not match current writing position! 57490 != 99818648
0:00:00.874578917 32616   0x1d4600 WARN                  queue2 gstqueue2.c:1610:gst_queue2_create_write:<queue2-0> buffer offset does not match current writing position! 76314 != 99837472
0:00:00.877421333 32616   0x1d4600 WARN                  queue2 gstqueue2.c:1610:gst_queue2_create_write:<queue2-0> buffer offset does not match current writing position! 77762 != 99838920
0:00:00.882384875 32616   0x1d4600 WARN                  queue2 gstqueue2.c:1610:gst_queue2_create_write:<queue2-0> buffer offset does not match current writing position! 82106 != 99843264
0:00:00.885572791 32616   0x1d4600 WARN                  queue2 gstqueue2.c:1610:gst_queue2_create_write:<queue2-0> buffer offset does not match current writing position! 86450 != 99847608
0:00:00.886786250 32616   0x1d4600 WARN                  queue2 gstqueue2.c:1610:gst_queue2_create_write:<queue2-0> buffer offset does not match current writing position! 89346 != 99850504
0:00:00.888003333 32616   0x1d4600 WARN                  queue2 gstqueue2.c:1610:gst_queue2_create_write:<queue2-0> buffer offset does not match current writing position! 92242 != 99853400
0:00:00.890657875 32616   0x1d4600 WARN                  queue2 gstqueue2.c:1610:gst_queue2_create_write:<queue2-0> buffer offset does not match current writing position! 95138 != 99856296
Comment 4 Philippe Normand 2013-03-09 04:46:28 PST
Comment on attachment 192301 [details]
Fix offset handling in GStreamer WebKitWebSource

Thanks!
Comment 5 WebKit Review Bot 2013-03-09 08:36:21 PST
Comment on attachment 192301 [details]
Fix offset handling in GStreamer WebKitWebSource

Clearing flags on attachment: 192301

Committed r145318: <http://trac.webkit.org/changeset/145318>
Comment 6 WebKit Review Bot 2013-03-09 08:36:24 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Martin Robinson 2013-03-09 14:51:28 PST
This should probably be merged into the WebKitGTK 2.x branch. Do you mind adding it to the merge tracker?
Comment 8 Sebastian Dröge (slomo) 2013-03-09 22:53:36 PST
How?
Comment 9 Martin Robinson 2013-03-10 11:00:43 PDT
Sorry. You should just add a link to the trac commit page to 
http://trac.webkit.org/wiki/WebKitGTK/2.0.x .