Index: media/base/android/media_decoder_job.cc |
diff --git a/media/base/android/media_decoder_job.cc b/media/base/android/media_decoder_job.cc |
index d96785e2121de96e6162c280da8ee3f6ef6dbdbf..a5b0da6f54c77c99b5752d503b8d7ef09d8de6a5 100644 |
--- a/media/base/android/media_decoder_job.cc |
+++ b/media/base/android/media_decoder_job.cc |
@@ -445,7 +445,7 @@ void MediaDecoderJob::DecodeInternal( |
// TODO(xhwang/qinmin): This logic is correct but strange. Clean it up. |
if (output_eos_encountered_) |
status = MEDIA_CODEC_OUTPUT_END_OF_STREAM; |
- else if (has_format_change) |
+ else if (has_format_change && UpdateOutputFormat()) |
gunsch
2015/01/12 16:30:51
What's the reason for moving UpdateOutputFormat up
kjoswiak
2015/01/12 19:44:48
Short story, it crashes without this change.
Long
|
status = MEDIA_CODEC_OUTPUT_FORMAT_CHANGED; |
bool render_output = presentation_timestamp >= preroll_timestamp_ && |
@@ -543,8 +543,7 @@ void MediaDecoderJob::OnDecodeCompleted( |
} |
if (status == MEDIA_CODEC_OUTPUT_FORMAT_CHANGED) { |
- if (UpdateOutputFormat()) |
- config_changed_cb_.Run(); |
+ config_changed_cb_.Run(); |
status = MEDIA_CODEC_OK; |
} |
@@ -649,10 +648,6 @@ bool MediaDecoderJob::IsCodecReconfigureNeeded( |
return true; |
} |
-bool MediaDecoderJob::UpdateOutputFormat() { |
- return false; |
-} |
- |
void MediaDecoderJob::ReleaseMediaCodecBridge() { |
if (!media_codec_bridge_) |
return; |