Title: [154693] trunk/Source/WebCore
- Revision
- 154693
- Author
- [email protected]
- Date
- 2013-08-27 08:55:21 -0700 (Tue, 27 Aug 2013)
Log Message
[Windows] some track language tags are not recognized
https://bugs.webkit.org/show_bug.cgi?id=120335
Reviewed by Eric Carlson.
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Revise implementation
to match logic in platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjc.mm
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (154692 => 154693)
--- trunk/Source/WebCore/ChangeLog 2013-08-27 15:50:29 UTC (rev 154692)
+++ trunk/Source/WebCore/ChangeLog 2013-08-27 15:55:21 UTC (rev 154693)
@@ -1,3 +1,13 @@
+2013-08-26 Brent Fulgham <[email protected]>
+
+ [Windows] some track language tags are not recognized
+ https://bugs.webkit.org/show_bug.cgi?id=120335
+
+ Reviewed by Eric Carlson.
+
+ * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: Revise implementation
+ to match logic in platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjc.mm
+
2013-08-27 Andreas Kling <[email protected]>
Clumsily fix Gtk+ build. Not my proudest moment.
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp (154692 => 154693)
--- trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp 2013-08-27 15:50:29 UTC (rev 154692)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp 2013-08-27 15:55:21 UTC (rev 154693)
@@ -849,6 +849,8 @@
if (!avAsset(m_avfWrapper))
return;
+ setDelayCharacteristicsChangedNotification(true);
+
bool haveCCTrack = false;
bool hasCaptions = false;
@@ -922,8 +924,10 @@
sizeChanged();
- if (!primaryAudioTrackLanguage.isNull() && primaryAudioTrackLanguage != languageOfPrimaryAudioTrack())
+ if (primaryAudioTrackLanguage != languageOfPrimaryAudioTrack())
player()->characteristicChanged();
+
+ setDelayCharacteristicsChangedNotification(false);
}
void MediaPlayerPrivateAVFoundationCF::sizeChanged()
@@ -1105,6 +1109,12 @@
AVCFAssetTrackRef track = (AVCFAssetTrackRef)CFArrayGetValueAtIndex(tracks.get(), 0);
RetainPtr<CFStringRef> language = adoptCF(AVCFAssetTrackCopyExtendedLanguageTag(track));
+ // If the language code is stored as a QuickTime 5-bit packed code there aren't enough bits for a full
+ // RFC 4646 language tag so extendedLanguageTag returns null. In this case languageCode will return the
+ // ISO 639-2/T language code so check it.
+ if (!language)
+ language = adoptCF(AVCFAssetTrackCopyLanguageCode(track));
+
// Some legacy tracks have "und" as a language, treat that the same as no language at all.
if (language && CFStringCompare(language.get(), CFSTR("und"), kCFCompareCaseInsensitive) != kCFCompareEqualTo) {
m_languageOfPrimaryAudioTrack = language.get();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes