Port the Mac-only changes from Bug 119643 (landed in https://trac.webkit.org/r154527) to Windows. Specifically: If a movie's language code is stored as a QuickTime 5-bit packed code there aren't enough bits for a full RFC 4646 language tag. The AVFoundation API we use returns NULL in this case, so we have to try another to see if we can get the ISO 639-2/T language code.
<rdar://problem/14836284>
Created attachment 209697 [details] Patch
Attachment 209697 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp']" exit_code: 1 Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:1113: Use 0 or null instead of NULL (even in *comments*). [readability/null] [4] Total errors found: 1 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 209697 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=209697&action=review > Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:928 > if (!primaryAudioTrackLanguage.isNull() && primaryAudioTrackLanguage != languageOfPrimaryAudioTrack()) > player()->characteristicChanged(); This should be: if (primaryAudioTrackLanguage != languageOfPrimaryAudioTrack()) characteristicsChanged(); >> Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:1113 >> + // RFC 4646 language tag so extendedLanguageTag returns NULL. In this case languageCode will return the > > Use 0 or null instead of NULL (even in *comments*). [readability/null] [4] StyleQueue fail :-O
Committed r154693: <http://trac.webkit.org/changeset/154693>
Minor correction made in r154694: <http://trac.webkit.org/changeset/154694>