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

Unified Diff: media/base/android/video_decoder_job.cc

Issue 805273007: Android: Propagate sample rate change to audio decoder job (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved UpdateOutput() back to original location Created 5 years, 11 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
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() {
« media/base/android/media_codec_bridge.h ('K') | « media/base/android/video_decoder_job.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698