Chromium Code Reviews| Index: media/filters/ffmpeg_audio_decoder.cc |
| diff --git a/media/filters/ffmpeg_audio_decoder.cc b/media/filters/ffmpeg_audio_decoder.cc |
| index b5dc7177655e033adc51c583d9035b08b2667b7d..3b5becfce09cfc1a7f0c520a59391694e87ed334 100644 |
| --- a/media/filters/ffmpeg_audio_decoder.cc |
| +++ b/media/filters/ffmpeg_audio_decoder.cc |
| @@ -300,10 +300,17 @@ bool FFmpegAudioDecoder::FFmpegDecode( |
| ChannelLayout channel_layout = ChannelLayoutToChromeChannelLayout( |
| codec_context_->channel_layout, codec_context_->channels); |
| - if (av_frame_->sample_rate != config_.samples_per_second() || |
| - channel_layout != config_.channel_layout() || |
| + bool config_is_stale = |
|
DaleCurtis
2016/04/07 20:05:04
Naming style in chrome is typically "is_config_sta
tguilbert
2016/04/07 21:08:50
Done.
|
| + av_frame_->sample_rate != config_.samples_per_second() || |
| channels != ChannelLayoutToChannelCount(config_.channel_layout()) || |
| - av_frame_->format != av_sample_format_) { |
| + av_frame_->format != av_sample_format_; |
| + |
| + // Only consider channel layout changes for AAC. |
|
DaleCurtis
2016/04/07 20:05:04
Add a comment why, something like:
// TODO(tguilb
tguilbert
2016/04/07 21:08:50
Done.
|
| + if(config_.codec() == kCodecAAC){ |
|
DaleCurtis
2016/04/07 20:05:04
run git cl format to fix formatting errors. notabl
tguilbert
2016/04/07 21:08:50
Done.
|
| + config_is_stale |= channel_layout != config_.channel_layout(); |
| + } |
| + |
| + if (config_is_stale) { |
| // Only allow midstream configuration changes for AAC. Sample format is |
| // not expected to change between AAC profiles. |
| if (config_.codec() == kCodecAAC && |