[Webkit-unassigned] [Bug 27743] New: MediaPlayer's SupportsType enum ordering causes it to prefer media engines reporting MayBeSupported

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 27 15:45:53 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=27743

           Summary: MediaPlayer's SupportsType enum ordering causes it to
                    prefer media engines reporting MayBeSupported
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Windows Vista
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P3
         Component: New Bugs
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: kylep at chromium.org


MediaPlayer.h:

105        enum SupportsType { IsNotSupported, IsSupported, MayBeSupported };

MediaPlayer.cpp:

169        unsigned count = engines.size();
170        for (unsigned ndx = 0; ndx < count; ndx++) {
171            MediaPlayer::SupportsType engineSupport =
engines[ndx]->supportsTypeAndCodecs(type, codecs);
172            if (engineSupport > supported) {
173                supported = engineSupport;
174                engine = engines[ndx];
175            }
176        }

Note that MayBeSupported > IsSupported, causing this function to select the
engine that reports MayBeSupported over engine that report IsSupported. Easy
fix - just reorder the enum to "enum SupportsType { IsNotSupported,
MayBeSupported, IsSupported };"

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



More information about the webkit-unassigned mailing list