[webkit-reviews] review granted: [Bug 209341] Ensure media cache directory is created before passing to AVURLAsset. : [Attachment 394095] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 20 10:21:08 PDT 2020


Eric Carlson <eric.carlson at apple.com> has granted Jer Noble
<jer.noble at apple.com>'s request for review:
Bug 209341: Ensure media cache directory is created before passing to
AVURLAsset.
https://bugs.webkit.org/show_bug.cgi?id=209341

Attachment 394095: Patch

https://bugs.webkit.org/attachment.cgi?id=394095&action=review




--- Comment #5 from Eric Carlson <eric.carlson at apple.com> ---
Comment on attachment 394095
  --> https://bugs.webkit.org/attachment.cgi?id=394095
Patch

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

> Source/WebKitLegacy/mac/ChangeLog:9
> +	   directory by default; ensure that it's media cache directory is set
during initialization.

"it's" :-O

>
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundati
onObjC.mm:874
>      [options setObject:@(!usePersistentCache)
forKey:AVURLAssetUsesNoPersistentCacheKey];
>      
> -    if (usePersistentCache)
> -	   [options
setObject:assetCacheForPath(player()->mediaCacheDirectory())
forKey:AVURLAssetCacheKey];
> +    if (usePersistentCache) {
> +	   if (auto* assetCache =
ensureAssetCacheExistsForPath(player()->mediaCacheDirectory()))
> +	       [options setObject:assetCache forKey:AVURLAssetCacheKey];
> +	   else

Shouldn't we set AVURLAssetUsesNoPersistentCacheKey to NO if
ensureAssetCacheExistsForPath() return nil?


More information about the webkit-reviews mailing list