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

Unified Diff: media/filters/audio_file_reader.cc

Issue 13991013: Linux: make it possible to compile against libav when use_system_ffmpeg==1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: varz Created 7 years, 8 months 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 | media/filters/ffmpeg_audio_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/audio_file_reader.cc
diff --git a/media/filters/audio_file_reader.cc b/media/filters/audio_file_reader.cc
index 32627b04b10ad558bab4b4facc386da0a3c4552d..60771cd51a3ec753ceff91c4a46f224ab7388583 100644
--- a/media/filters/audio_file_reader.cc
+++ b/media/filters/audio_file_reader.cc
@@ -179,13 +179,19 @@ int AudioFileReader::Read(AudioBus* audio_bus) {
break;
}
+#ifdef CHROMIUM_NO_AVFRAME_CHANNELS
+ int channels = av_get_channel_layout_nb_channels(
+ av_frame->channel_layout);
+#else
+ int channels = av_frame->channels;
+#endif
if (av_frame->sample_rate != sample_rate_ ||
- av_frame->channels != channels_ ||
+ channels != channels_ ||
av_frame->format != av_sample_format_) {
DLOG(ERROR) << "Unsupported midstream configuration change!"
<< " Sample Rate: " << av_frame->sample_rate << " vs "
<< sample_rate_
- << ", Channels: " << av_frame->channels << " vs "
+ << ", Channels: " << channels << " vs "
<< channels_
<< ", Sample Format: " << av_frame->format << " vs "
<< av_sample_format_;
« no previous file with comments | « no previous file | media/filters/ffmpeg_audio_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698