Chromium Code Reviews| Index: media/base/android/video_decoder_job.cc |
| diff --git a/media/base/android/video_decoder_job.cc b/media/base/android/video_decoder_job.cc |
| index e69426db7752aab98af060756aface45494cb5cf..65e329a1598d25cbd6f6c7e1c0518f83084081ea 100644 |
| --- a/media/base/android/video_decoder_job.cc |
| +++ b/media/base/android/video_decoder_job.cc |
| @@ -153,9 +153,10 @@ void VideoDecoderJob::CurrentDataConsumed(bool is_config_change) { |
| next_video_data_is_iframe_ = is_config_change; |
| } |
| -bool VideoDecoderJob::UpdateOutputFormat() { |
| +bool VideoDecoderJob::UpdateOutputFormat( |
| + const base::Closure& config_changed_cb) { |
| if (!media_codec_bridge_) |
| - return false; |
| + return true; |
| int prev_output_width = output_width_; |
| int prev_output_height = output_height_; |
| // See b/18224769. The values reported from MediaCodecBridge::GetOutputFormat |
| @@ -163,8 +164,11 @@ bool VideoDecoderJob::UpdateOutputFormat() { |
| // size that should be output. |
| output_width_ = config_width_; |
| output_height_ = config_height_; |
| - return (output_width_ != prev_output_width) || |
| - (output_height_ != prev_output_height); |
| + if ((output_width_ != prev_output_width) || |
| + (output_height_ != prev_output_height)) |
| + config_changed_cb.Run(); |
|
qinmin
2015/01/21 02:04:13
nit: {} required for if statement that spans multi
kjoswiak
2015/01/21 03:21:18
Done.
|
| + |
| + return true; |
| } |
| bool VideoDecoderJob::IsProtectedSurfaceRequired() { |