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

Unified Diff: media/cast/test/fake_media_source.cc

Issue 1422113002: Enable pcm_s32le audio decoding. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: DEPS roll Created 5 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 | « media/base/sample_format.cc ('k') | media/ffmpeg/ffmpeg_common.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/test/fake_media_source.cc
diff --git a/media/cast/test/fake_media_source.cc b/media/cast/test/fake_media_source.cc
index b8820b7c8ea06bb8d118150ba56e13ee7816b044..24327d030e83f40fa63cdbfc4e3a49fac4c6b16f 100644
--- a/media/cast/test/fake_media_source.cc
+++ b/media/cast/test/fake_media_source.cc
@@ -470,18 +470,14 @@ void FakeMediaSource::DecodeAudio(ScopedAVPacket packet) {
audio_sent_ts_->SetBaseTimestamp(base_ts);
}
- scoped_refptr<AudioBuffer> buffer =
- AudioBuffer::CopyFrom(
- AVSampleFormatToSampleFormat(
- av_audio_context()->sample_fmt),
- ChannelLayoutToChromeChannelLayout(
- av_audio_context()->channel_layout,
- av_audio_context()->channels),
- av_audio_context()->channels,
- av_audio_context()->sample_rate,
- frames_read,
- &avframe->data[0],
- PtsToTimeDelta(avframe->pkt_pts, av_audio_stream()->time_base));
+ scoped_refptr<AudioBuffer> buffer = AudioBuffer::CopyFrom(
+ AVSampleFormatToSampleFormat(av_audio_context()->sample_fmt,
+ av_audio_context()->codec_id),
+ ChannelLayoutToChromeChannelLayout(av_audio_context()->channel_layout,
+ av_audio_context()->channels),
+ av_audio_context()->channels, av_audio_context()->sample_rate,
+ frames_read, &avframe->data[0],
+ PtsToTimeDelta(avframe->pkt_pts, av_audio_stream()->time_base));
audio_algo_.EnqueueBuffer(buffer);
av_frame_unref(avframe);
} while (packet_temp.size > 0);
« no previous file with comments | « media/base/sample_format.cc ('k') | media/ffmpeg/ffmpeg_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698