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..115d0096c9d53e0064b7134372acb5466b2b5ffc 100644 |
--- a/media/base/android/media_decoder_job.cc |
+++ b/media/base/android/media_decoder_job.cc |
@@ -445,8 +445,13 @@ 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) |
- status = MEDIA_CODEC_OUTPUT_FORMAT_CHANGED; |
+ else if (has_format_change) { |
qinmin
2015/01/12 23:57:15
This is on the decoder thread, you should never ca
kjoswiak
2015/01/13 00:14:30
Ahh, hmm. See my reply to Jesse's comment in patch
kjoswiak
2015/01/13 00:39:42
Looking closer, this fix wouldn't change anything.
gunsch
2015/01/13 00:45:31
Kyle: check the first line of each function. Some
qinmin
2015/01/13 00:46:51
you are touching variables like time_stamp_helper,
kjoswiak
2015/01/13 01:05:58
Hmm I see. We use audio_timestamp_helper_ in Relea
|
+ status = UpdateOutputFormat(); |
+ if (status == MEDIA_CODEC_ERROR) { |
+ callback.Run(status, kNoTimestamp(), kNoTimestamp()); |
+ return; |
+ } |
+ } |
bool render_output = presentation_timestamp >= preroll_timestamp_ && |
(status != MEDIA_CODEC_OUTPUT_END_OF_STREAM || size != 0u); |
@@ -543,8 +548,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 +653,6 @@ bool MediaDecoderJob::IsCodecReconfigureNeeded( |
return true; |
} |
-bool MediaDecoderJob::UpdateOutputFormat() { |
- return false; |
-} |
- |
void MediaDecoderJob::ReleaseMediaCodecBridge() { |
if (!media_codec_bridge_) |
return; |