Skip to content

Commit

Permalink
#434: put this on hold for the moment
Browse files Browse the repository at this point in the history
  • Loading branch information
classilla committed Sep 1, 2017
1 parent 0792006 commit 8a6fd1e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions dom/media/MediaDecoderStateMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ static uint32_t sVideoQueueSendToCompositorSize = VIDEO_QUEUE_SEND_TO_COMPOSITOR
// TenFourFox issue 434
// Seconds to stall the video decoder on initial startup to allow sufficient
// buildup in memory and other items onscreen to render.
static const uint32_t DEFAULT_VIDEO_DECODE_STARTUP_DELAY = 6;
// Currently disabled by default.
static const uint32_t DEFAULT_VIDEO_DECODE_STARTUP_DELAY = 0;
static uint32_t sVideoDecodeStartupDelay = DEFAULT_VIDEO_DECODE_STARTUP_DELAY;

static void InitVideoQueuePrefs() {
Expand Down Expand Up @@ -2053,7 +2054,7 @@ MediaDecoderStateMachine::OnMetadataRead(MetadataHolder* aMetadata)
if (HasVideo() && MOZ_LIKELY(sVideoDecodeStartupDelay > 0)) {
FrameStatistics& frameStats = *mFrameStats;
// Fake out MSE by saying we've already dropped a crapload of frames.
frameStats.NotifyDecodedFrames(0, 0, 2000);
frameStats.NotifyDecodedFrames(0, 0, 4000);
// Stall a bit to let everything load.
ScheduleStateMachineIn(USECS_PER_S * sVideoDecodeStartupDelay);
return;
Expand Down Expand Up @@ -2346,7 +2347,7 @@ nsresult MediaDecoderStateMachine::RunStateMachine()
if (HasVideo() && MOZ_LIKELY(sVideoDecodeStartupDelay > 0)) {
FrameStatistics& frameStats = *mFrameStats;
// Fake out MSE by saying we've dropped a crapload more of frames.
frameStats.NotifyDecodedFrames(0, 0, 2000);
frameStats.NotifyDecodedFrames(0, 0, 4000);
}

ScheduleStateMachine();
Expand Down

0 comments on commit 8a6fd1e

Please sign in to comment.