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

Unified Diff: media/filters/ffmpeg_audio_decoder.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 | « media/filters/audio_file_reader.cc ('k') | media/media.gyp » ('j') | 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 6df6112e7526dfbefa18044b643484fe8a51862e..92c851f98f1b9c623dcc8eab5de5f0524c248308 100644
--- a/media/filters/ffmpeg_audio_decoder.cc
+++ b/media/filters/ffmpeg_audio_decoder.cc
@@ -396,14 +396,20 @@ void FFmpegAudioDecoder::RunDecodeLoop(
}
int decoded_audio_size = 0;
+#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 (frame_decoded) {
if (av_frame_->sample_rate != samples_per_second_ ||
- 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 "
<< samples_per_second_
- << ", Channels: " << av_frame_->channels << " vs "
+ << ", Channels: " << channels << " vs "
<< channels_
<< ", Sample Format: " << av_frame_->format << " vs "
<< av_sample_format_;
« no previous file with comments | « media/filters/audio_file_reader.cc ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698