WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
120369
Duplicate in-band tracks when switching <source> elements
https://bugs.webkit.org/show_bug.cgi?id=120369
Summary
Duplicate in-band tracks when switching <source> elements
Brendan Long
Reported
2013-08-27 11:18:02 PDT
When we change the source of a HTMLMediaElement like this: var newSource = document.createElement("source"); newSource.src = "some-video.m4v"; video.replaceChild(newSource, video.firstChild); In HTMLMediaElement::loadNextSourceChild, we: // Recreate the media player for the new url createMediaPlayer(); And in HTMLMediaElement::createMediaPlayer(): m_player = MediaPlayer::create(this); This will cause any existing MediaPlayer to be destroyed, and because ~MediaPlayer removes the client: MediaPlayer::~MediaPlayer() { m_mediaPlayerClient = 0; } It's impossible for the MediaPlayerPrivate to remove any existing in-band tracks. One fix is to do this in createMediaPlayer(): #if ENABLE(VIDEO_TRACK) removeAllInbandTracks(); #endif m_player = MediaPlayer::create(this); For some reason, media-related tests always time out for me, so I'm not able to attach the expected results for this test :\
Attachments
Patch
(4.34 KB, patch)
2013-08-27 11:19 PDT
,
Brendan Long
no flags
Details
Formatted Diff
Diff
Updated patch
(4.19 KB, patch)
2013-08-27 13:16 PDT
,
Eric Carlson
buildbot
: commit-queue-
Details
Formatted Diff
Diff
Add expected result file
(5.30 KB, patch)
2013-08-27 14:09 PDT
,
Brendan Long
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from webkit-ews-01 for mac-mountainlion
(741.11 KB, application/zip)
2013-08-27 14:37 PDT
,
Build Bot
no flags
Details
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Brendan Long
Comment 1
2013-08-27 11:19:50 PDT
Created
attachment 209786
[details]
Patch
Brendan Long
Comment 2
2013-08-27 11:24:08 PDT
I'm building WebKit on a Mac so I can get the expected test results, it should be done by the time I get back from work.
Brendan Long
Comment 3
2013-08-27 12:46:57 PDT
I tried building this on OSX with: Tools/Scripts/build-webkit --debug --video-track Then: Tools/Scripts/run-webkit-tests --debug LayoutTests/media/track/track-in-band-duplicate-tracks-when-source-changes.html Which results in a crash in DumpRenderTree, and if I use run-safari, it doesn't see the in-band tracks, and run-launcher doesn't seem to work (can't exec WebKitBuild/Debug: Permission Denied). It's possible my mac is broken somehow :\
Eric Carlson
Comment 4
2013-08-27 13:16:51 PDT
Created
attachment 209791
[details]
Updated patch If the test uses reportExpected() instead of testExpected(), the number of in-band tracks won't be logged and we should be able to use the same test results for all ports that support in-band tracks.
Brendan Long
Comment 5
2013-08-27 13:32:42 PDT
(In reply to
comment #4
)
> Created an attachment (id=209791) [details] > Updated patch > > If the test uses reportExpected() instead of testExpected(), the number of in-band tracks won't be logged and we should be able to use the same test results for all ports that support in-band tracks.
Thanks for the suggestion. I might need to use that in the tests on my other patches too.
Brendan Long
Comment 6
2013-08-27 14:09:11 PDT
Created
attachment 209799
[details]
Add expected result file I got the 'expected' file out of DumpRenderTree (which works perfectly for some reason, even though run-webkit-tests doesn't).
Brendan Long
Comment 7
2013-08-27 14:10:50 PDT
Wait, why does EWS say your patch passed, when my original patch got this output?
> Regressions: Unexpected missing results (1) > media/track/track-in-band-duplicate-tracks-when-source-changes.html [ Missing ]
Brendan Long
Comment 8
2013-08-27 14:34:16 PDT
(In reply to
comment #7
)
> Wait, why does EWS say your patch passed, when my original patch got this output? > > > Regressions: Unexpected missing results (1) > > media/track/track-in-band-duplicate-tracks-when-source-changes.html [ Missing ]
Nevermind, I think I just didn't wait long enough.
Build Bot
Comment 9
2013-08-27 14:37:22 PDT
Comment on
attachment 209791
[details]
Updated patch
Attachment 209791
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/1618043
New failing tests: media/track/track-in-band-duplicate-tracks-when-source-changes.html
Build Bot
Comment 10
2013-08-27 14:37:23 PDT
Created
attachment 209802
[details]
Archive of layout-test-results from webkit-ews-01 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-01 Port: mac-mountainlion Platform: Mac OS X 10.8.4
Brendan Long
Comment 11
2013-08-28 10:03:33 PDT
The buildbot errors were from the previous patch by the way. The current patch works.
WebKit Commit Bot
Comment 12
2013-08-28 11:25:57 PDT
Comment on
attachment 209799
[details]
Add expected result file Clearing flags on attachment: 209799 Committed
r154760
: <
http://trac.webkit.org/changeset/154760
>
WebKit Commit Bot
Comment 13
2013-08-28 11:25:59 PDT
All reviewed patches have been landed. Closing bug.
Ryosuke Niwa
Comment 14
2013-09-18 19:12:51 PDT
The test added by this patch appears to have never passed on Lion:
http://webkit-test-results.appspot.com/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=media%2Ftrack%2Ftrack-in-band-duplicate-tracks-when-source-changes.html
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug