Bug 1309761 - Some tweaks to MediaDecoder::DumpDebugInfo().
MozReview-Commit-ID: 9e7sImUs2vz
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -1890,24 +1890,26 @@ MediaDecoder::NextFrameBufferedStatus()
: MediaDecoderOwner::NEXT_FRAME_UNAVAILABLE;
}
void
MediaDecoder::DumpDebugInfo()
{
MOZ_ASSERT(!IsShutdown());
DUMP_LOG("metadata: channels=%u rate=%u hasAudio=%d hasVideo=%d, "
- "state: mPlayState=%s mIsDormant=%d",
+ "state: mPlayState=%s mIsDormant=%d, mdsm=%p",
mInfo ? mInfo->mAudio.mChannels : 0, mInfo ? mInfo->mAudio.mRate : 0,
mInfo ? mInfo->HasAudio() : 0, mInfo ? mInfo->HasVideo() : 0,
- PlayStateStr(), mIsDormant);
+ PlayStateStr(), mIsDormant, GetStateMachine());
nsString str;
GetMozDebugReaderData(str);
- DUMP_LOG("reader data:\n%s", NS_ConvertUTF16toUTF8(str).get());
+ if (!str.IsEmpty()) {
+ DUMP_LOG("reader data:\n%s", NS_ConvertUTF16toUTF8(str).get());
+ }
if (GetStateMachine()) {
GetStateMachine()->DumpDebugInfo();
}
}
void
MediaDecoder::NotifyAudibleStateChanged()