Bug 129278 - [Win] Gracefully recover from missing "naturalSize" parameter for media
Summary: [Win] Gracefully recover from missing "naturalSize" parameter for media
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brent Fulgham
Keywords: InRadar
Depends on:
Reported: 2014-02-24 17:06 PST by Brent Fulgham
Modified: 2014-02-25 11:42 PST (History)
7 users (show)

See Also:

Patch (5.58 KB, patch)
2014-02-24 22:09 PST, 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 2014-02-24 17:06:12 PST
In some cases, we get a zero-size "naturalSize" result when querying the media for its size. When this happens, we should not refuse to play the media. Instead, we should use the player item's "presentationSize".
Comment 1 Brent Fulgham 2014-02-24 17:06:53 PST
Comment 2 Brent Fulgham 2014-02-24 22:09:12 PST
Created attachment 225121 [details]
Comment 3 Eric Carlson 2014-02-25 07:45:33 PST
Comment on attachment 225121 [details]

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

> Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:758
> +                // Don't treat a failure to retrieve these parameters as fatal. We will use @"presentationSize" instead.
> +                // <rdar://problem/15966685>

This comment (and the change log) imply that MediaCharacteristicsWithMediaSelectionOptions is equivalent to NaturalSize. This is seems unlikely. Having separate comparisons for each, with a comment about why it is OK to fail to retrieve MediaCharacteristicsWithMediaSelectionOptions, would be better.

> Source/WebCore/platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:904
>              if (AVCFPlayerItemTrackIsEnabled(track)) {
>                  RetainPtr<AVCFAssetTrackRef> assetTrack = adoptCF(AVCFPlayerItemTrackCopyAssetTrack(track));
> +                if (!assetTrack)
> +                    continue;

This seems odd, please add a comment about why we don't care that a track is enabled but not available.
Comment 4 Brent Fulgham 2014-02-25 11:42:11 PST
Committed r164660: <http://trac.webkit.org/changeset/164660>