Bug 58462 - Media engine fallback doesn't always work
Summary: Media engine fallback doesn't always work
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Eric Carlson
URL:
Keywords: InRadar, PlatformOnly
Depends on:
Blocks:
 
Reported: 2011-04-13 11:33 PDT by Eric Carlson
Modified: 2011-04-13 14:20 PDT (History)
2 users (show)

See Also:


Attachments
Proposed patch. (1.78 KB, patch)
2011-04-13 12:00 PDT, Eric Carlson
ap: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Carlson 2011-04-13 11:33:50 PDT
When a media engine fails to open a url before readyState reaches HAVE_METADATA, MediaPlayer::networkStateChanged is supposed to try to open it with the next media engine. This doesn't work when the file doesn't have a MIME type and doesn't have an extension, eg. opening https://bug-52552-attachments.webkit.org/attachment.cgi?id=79249 in a media document.
Comment 1 Eric Carlson 2011-04-13 12:00:00 PDT
Created attachment 89424 [details]
Proposed patch.
Comment 2 Eric Carlson 2011-04-13 12:00:44 PDT
<rdar://problem/9278261>
Comment 3 WebKit Review Bot 2011-04-13 12:02:02 PDT
Attachment 89424 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1

Source/WebCore/platform/graphics/MediaPlayer.cpp:791:  Extra space after ( in if  [whitespace/parens] [5]
Total errors found: 1 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Eric Carlson 2011-04-13 12:03:53 PDT
(In reply to comment #3)
> Attachment 89424 [details] did not pass style-queue:
> 
> Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1
> 
> Source/WebCore/platform/graphics/MediaPlayer.cpp:791:  Extra space after ( in if  [whitespace/parens] [5]

Oh dear, I have been shamed by the pedantic-bot!
Comment 5 Alexey Proskuryakov 2011-04-13 12:33:52 PDT
Comment on attachment 89424 [details]
Proposed patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=89424&action=review

As discussed in person, it is wrong that we don't have a MIME type here - WebKit knew it when it decided to create a media document. Passing the MIME type down would be another way to fix this particular bug.

There are other ways to reach this code without a known MIME type, so the fix is still useful.

> Source/WebCore/ChangeLog:8
> +        No new tests, this was verified manually with the url noted in the bug.

This doesn't really explain why there is no regression test.
Comment 6 Eric Carlson 2011-04-13 14:20:05 PDT
http://trac.webkit.org/changeset/83763