Closed Bug 1061702 Opened 10 years ago Closed 10 years ago

After setting mozSrcObject() to null, a stream can continue to play through a <video>/<audio> element

Categories

(Core :: Audio/Video, defect)

34 Branch
x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla35
blocking-b2g 2.1+
Tracking Status
firefox33 --- unaffected
firefox34 + fixed
firefox35 --- fixed
b2g-v2.1 --- fixed
b2g-v2.2 --- fixed

People

(Reporter: jesup, Assigned: jesup)

References

Details

(Keywords: regression)

Attachments

(1 file)

STR: Generate call ID, paste it into window, hit call, share camera/mic, accept call, end call from small window.  (linux debug)

The left-over audio is fragmentary; bits of the ringtone sometimes, just occasional pops at other times.

It continues, but eventually stops.  It appears it will stop when I navigate away, and then hit CC and then GC in about:memory.  100% repeatable on my inbound debug build from this morning (and yesterday inbound as well).

Not sure who would be appropriate so cc'd a bunch
I've heard the problem on Android and Gonk as well.
Actually, it's a combination of the ring tone and the last thing the party at the other end said aid aid id d d d d.
I see this in gum_test.html, so it's a core issue - likely a regression from bug 848954

stopMedia() calls mozSrcObject.stop() (which seems to work), and then does mozSrcObject = null, which seems to not fully work (anymore).

padenot is on PTO, so we'll have to dig this one out without him.
Blocks: 848954
Component: Client → Video/Audio
Product: Loop → Core
QA Contact: anthony.s.hughes
Version: unspecified → 34 Branch
Fairly certain this is related to bug 848954, which means 34 & 35 only
Keywords: regression
Summary: After ending a Loop call to myself, I hear bits of the ringtone for a while → After setting mozSrcObject() to null, a stream can continue to play through a <video>/<audio> element
Whiteboard: [webrtc-uplift]
I believe I am running into this on my Android device (Nightly 10/02), e.g, on stopMedia for the audio test on http://mozilla.github.io/webrtc-landing/gum_test.html, I get a never-ending loop of audible audio (sounds like an audio hang on an old frozen PC machine)
Comment on attachment 8499219 [details] [diff] [review]
Stop audio sources from continuing to play garbage after being stopped

The cause was that if all the audio streams were finished (but not removed yet) they would generate 0 ticks out output - and the Mixer callback would never be called, leaving us to feed the buffer back to the system with whatever was left over in the scratch buffer and a bunch of garbage (which might be previous audio, or distorted previous audio).

This clears any data we didn't actually write to.
Attachment #8499219 - Flags: review?(karlt)
Comment on attachment 8499219 [details] [diff] [review]
Stop audio sources from continuing to play garbage after being stopped

Whomever can get to it.  Need it for uplift to Aurora/34.  Thanks
Attachment #8499219 - Flags: review?(roc)
Assignee: nobody → rjesup
https://hg.mozilla.org/mozilla-central/rev/06f845c14a8e
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
(In reply to Randell Jesup [:jesup] from comment #8)
> Whomever can get to it.  Need it for uplift to Aurora/34.  Thanks

I suppose you forgot about this?
Flags: needinfo?(rjesup)
[Tracking Requested - why for this release]: regression
Comment on attachment 8499219 [details] [diff] [review]
Stop audio sources from continuing to play garbage after being stopped

Approval Request Comment
[Feature/regressing bug #]: bug 848954

[User impact if declined]: Random audio for a random time after ending a getUserMedia stream

[Describe test coverage new/current, TBPL]:  Well tested on 35 and 36

[Risks and why]: very low risk; zero out buffers when data is requested if needed.

[String/UUID change made/needed]: none
Flags: needinfo?(rjesup)
Attachment #8499219 - Flags: approval-mozilla-beta?
Comment on attachment 8499219 [details] [diff] [review]
Stop audio sources from continuing to play garbage after being stopped

Beta+
Attachment #8499219 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
[Blocking Requested - why for this release]:
Can cause audio to continue to play random data (usually somewhat trashed previous-audio-data) after ending a call or audio stream.

Simple, safe fix.
blocking-b2g: --- → 2.1?
Comment on attachment 8499219 [details] [diff] [review]
Stop audio sources from continuing to play garbage after being stopped

NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 848954 (landed in 34)

User impact if declined:
Can cause audio to continue to play random data (usually somewhat trashed previous-audio-data) after ending a call or audio stream.

Testing completed: landed many weeks ago on desktop 35

Risk to taking this patch (and alternatives if risky): 
Simple, safe fix.

String or UUID changes made by this patch: none
Attachment #8499219 - Flags: approval-mozilla-b2g34?
Attachment #8499219 - Flags: approval-mozilla-b2g34?
blocking-b2g: 2.1? → 2.1+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: