Bug 120335 - [Windows] some track language tags are not recognized
Summary: [Windows] some track language tags are not recognized
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Unspecified
: P2 Normal
Assignee: Brent Fulgham
URL:
Keywords: InRadar
Depends on: 119643
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-26 17:32 PDT by Brent Fulgham
Modified: 2013-08-27 09:01 PDT (History)
4 users (show)

See Also:


Attachments
Patch (2.54 KB, patch)
2013-08-26 17:37 PDT, Brent Fulgham
eric.carlson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2013-08-26 17:32:59 PDT
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.
Comment 1 Brent Fulgham 2013-08-26 17:33:25 PDT
<rdar://problem/14836284>
Comment 2 Brent Fulgham 2013-08-26 17:37:16 PDT
Created attachment 209697 [details]
Patch
Comment 3 WebKit Commit Bot 2013-08-26 17:38:29 PDT
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 4 Eric Carlson 2013-08-26 17:49:15 PDT
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
Comment 5 Brent Fulgham 2013-08-27 08:54:25 PDT
Committed r154693: <http://trac.webkit.org/changeset/154693>
Comment 6 Brent Fulgham 2013-08-27 09:01:18 PDT
Minor correction made in r154694: <http://trac.webkit.org/changeset/154694>