Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(140)

Unified Diff: media/filters/ffmpeg_audio_decoder.cc

Issue 2464963003: Use FFmpeg default padding when allocating audio buffers. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_audio_decoder.cc
diff --git a/media/filters/ffmpeg_audio_decoder.cc b/media/filters/ffmpeg_audio_decoder.cc
index 9f5325a24803ed92dc72f67d9a81329c0a6ffc29..14308435c5eeb8e641bc8f28fc80169412ab9877 100644
--- a/media/filters/ffmpeg_audio_decoder.cc
+++ b/media/filters/ffmpeg_audio_decoder.cc
@@ -87,12 +87,9 @@ static int GetAudioBuffer(struct AVCodecContext* s, AVFrame* frame, int flags) {
// Determine how big the buffer should be and allocate it. FFmpeg may adjust
// how big each channel data is in order to meet the alignment policy, so
// we need to take this into consideration.
- int buffer_size_in_bytes =
- av_samples_get_buffer_size(&frame->linesize[0],
- channels,
- frame->nb_samples,
- format,
- AudioBuffer::kChannelAlignment);
+ int buffer_size_in_bytes = av_samples_get_buffer_size(
+ &frame->linesize[0], channels, frame->nb_samples, format,
+ 0 /* align, use ffmpeg default */);
// Check for errors from av_samples_get_buffer_size().
if (buffer_size_in_bytes < 0)
return buffer_size_in_bytes;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698