Closed Bug 1600063 Opened 5 years ago Closed 4 years ago

Recently, equalizer extensions cause html5 audio to lag when playing/pausing

Categories

(Core :: Audio/Video: Playback, defect, P2)

72 Branch
defect

Tracking

()

VERIFIED FIXED
mozilla73
Tracking Status
firefox-esr68 --- unaffected
firefox70 --- unaffected
firefox71 --- unaffected
firefox72 + verified
firefox73 --- verified

People

(Reporter: aminomancer, Assigned: pehrsons)

References

(Regressed 1 open bug, Regression)

Details

(Keywords: regression)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0

Steps to reproduce:

  • Install an equalizer extension like "Audio Equalizer" or "H5EQ" on Firefox Nightly (only tested on Windows 10)
  • Go to youtube or netflix or some other video website
  • Press play, then press pause.
  • Disable the extension, reload the video webpage, then do the same thing.

Actual results:

Upon clicking pause, the video takes longer than expected to pause, and the audio keeps going for like 3 seconds. For every html video player I've tested so far. I actually thought this was an issue with decoding until I realized the problem resolves when I disable my EQ. When you start the video back up again, they fall back in sync but that seems to be caused by the video skipping forward to catch up with the audio. Makes it pretty noticeable since you miss a couple seconds of video due to that.

Expected results:

The video and audio should both stop immediately when pausing and start immediately when playing. Up until this month, they did. These extensions worked fine for me and didn't have any noticeable side effects besides adding inline scripts to every page. So I don't think this is an unavoidable consequence of using an equalizer extension.

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core

Thanks for filing!

This sounds like fallout from bug 1172394. I'm setting flags based on that assumption, but I'll need to look deeper into it.

Assignee: nobody → apehrson
Keywords: regression
Priority: -- → P2
Regressed by: 1172394
Status: UNCONFIRMED → NEW
Ever confirmed: true
Status: NEW → ASSIGNED
Depends on: 1597935

[Tracking Requested - why for this release]: Regression for popular audio addons. A webaudio node is also affected.

Attachment #9113802 - Attachment description: Bug 1600063 - Clear future audio data when the DecodedStream mediasink is paused. r?padenot → Bug 1600063 - Clear future data when the DecodedStream mediasink stops playing. r?padenot
Pushed by pehrsons@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/b7ef124e4519
Clear future data when the DecodedStream mediasink stops playing. r=padenot
https://hg.mozilla.org/integration/autoland/rev/0ccc77928faa
Add some logging for DecodedStream. r=padenot
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73

Comment on attachment 9113802 [details]
Bug 1600063 - Clear future data when the DecodedStream mediasink stops playing. r?padenot

Beta/Release Uplift Approval Request

  • User impact if declined: Audio equalizer addons result in a/v sync issues, and pausing/seeking where audio takes some time to stop across all sites. Some sites are natively affected, soundcloud is likely one such high profile site.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: See comment 0. Use https://addons.mozilla.org/en-US/firefox/addon/audio-equalizer-wext/ for the first step.
  • List of other uplifts needed: None
  • Risk to taking this patch: Medium
  • Why is the change risky/not risky? (and alternatives if risky): Considering what we do in the patch I'd consider it low risk, but fallout from this code can sometimes be unexpected and hard to overview, so I err on the safe side and say medium.
    The patch adds code that does things to 1) DecodedStream, on the owner thread (single thread - no race issues), 2) SourceMediaTrack, behind its Mutex (locked mutex - no race issues).
  • String changes made/needed:
Attachment #9113802 - Flags: approval-mozilla-beta?
Attachment #9114569 - Flags: approval-mozilla-beta?

Comment on attachment 9113802 [details]
Bug 1600063 - Clear future data when the DecodedStream mediasink stops playing. r?padenot

let's get this in 72.0b6 and be on the lookout for fallout

Attachment #9113802 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: qe-verify+
Attachment #9114569 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [qa-triaged]

Hello! Reproduced the issue using Firefox 72.0a1 (20191128214853) on Windows 10x64.
Te issue is verified fixed with Firefox 73.0a1 (20191216095052) on Windows 10x64, macOS 10.15 and Ubuntu 18.04. No lag is presented when using play/pause options with the addon from comment 8.
Unfortunately, the issue is still reproducing on Firefox 72.0b7 (20191213132525). The lag is still present after pausing the video on youtube or Netflix.
Andreas Pehrson can you please have a look? Thanks!

Flags: needinfo?(apehrson)

Ah, yes, that makes sense. We need bug 1597935 uplifted as well.

Flags: needinfo?(apehrson)
Regressions: 1198168

Per bug 1597935 comment 10 -- used the STR from this bug.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: