Commit 7f4c7ff6 authored by Dan Sanders's avatar Dan Sanders Committed by Commit Bot

[media] Set allocation limit compatible with FFmpeg 4.3

Previously we set the limit to zero, meaning no limit, but FFmpeg 4.3
will not allocate at all with that setting.

Changed to std::numeric_limits<size_t>::max().

Bug: 1095962
Change-Id: I96820c21f794f2814e955ee75ff22dfd31804c29
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2349405Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Commit-Queue: Dan Sanders <sandersd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#796966}
parent 2dbf1498
...@@ -4,6 +4,9 @@ ...@@ -4,6 +4,9 @@
#include "media/base/media.h" #include "media/base/media.h"
#include <stdint.h>
#include <limits>
#include "base/allocator/buildflags.h" #include "base/allocator/buildflags.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "base/macros.h" #include "base/macros.h"
...@@ -41,7 +44,7 @@ class MediaInitializer { ...@@ -41,7 +44,7 @@ class MediaInitializer {
#if BUILDFLAG(USE_ALLOCATOR_SHIM) #if BUILDFLAG(USE_ALLOCATOR_SHIM)
// Remove allocation limit from ffmpeg, so calls go down to shim layer. // Remove allocation limit from ffmpeg, so calls go down to shim layer.
av_max_alloc(0); av_max_alloc(std::numeric_limits<size_t>::max());
#endif // BUILDFLAG(USE_ALLOCATOR_SHIM) #endif // BUILDFLAG(USE_ALLOCATOR_SHIM)
#endif // BUILDFLAG(ENABLE_FFMPEG) #endif // BUILDFLAG(ENABLE_FFMPEG)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment