Bug 1319706. Part 4 - add some logs to debug 'ended' not fired. r?kaku
MozReview-Commit-ID: ATqszBBdo1P
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -980,19 +980,24 @@ MediaDecoder::IsShutdown() const
void
MediaDecoder::PlaybackEnded()
{
MOZ_ASSERT(NS_IsMainThread());
MOZ_DIAGNOSTIC_ASSERT(!IsShutdown());
if (mLogicallySeeking || mPlayState == PLAY_STATE_LOADING) {
+ DECODER_LOG("MediaDecoder::PlaybackEnded bailed out, "
+ "mLogicallySeeking=%d mPlayState=%s",
+ mLogicallySeeking.Ref(), ToPlayStateStr(mPlayState));
return;
}
+ DECODER_LOG("MediaDecoder::PlaybackEnded");
+
ChangeState(PLAY_STATE_ENDED);
InvalidateWithFlags(VideoFrameContainer::INVALIDATE_FORCE);
mOwner->PlaybackEnded();
// This must be called after |mOwner->PlaybackEnded()| call above, in order
// to fire the required durationchange.
if (IsInfinite()) {
SetInfinite(false);