Closed Bug 464457 Opened 16 years ago Closed 16 years ago

No sound when playing videos

Categories

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

x86
Linux
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: laurent, Unassigned)

References

Details

(Keywords: regression, verified1.9.1)

Attachments

(1 file)

On my two computers (with kubuntu 7.10 and ubuntu 8.05), there is no sound when playing videos like http://www.double.co.nz/video_test/test5.html with the nightlies of firefox.

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b2pre) Gecko/20081112 Minefield/3.1b2pre

However, no problem with Fx 3.1b1.
Flags: blocking1.9.1?
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b2pre) Gecko/20081111 Minefield/3.1b2pre

On Windows there's sound.
We should investigate this, although it could be a Linux issue beyond our control.
Flags: blocking1.9.1? → blocking1.9.1+
Do the builds at:
https://build.mozilla.org/tryserver-builds/2008-11-23_12:25-dbaron@mozilla.com-bug464457/
fix this for you?

They have these two lines:
-    if (PRUint32(mAudioStream->Available()) < aFrame->mAudioData.Length())
-      return PR_FALSE;
in nsOggDecodeStateMachine::PlayAudio(FrameData* aFrame) commented out, which works around the bug for me.
If this is the case, sounds like bug 463627. Can you try the patch in that bug?
David's build fixes the issue for me.  I'll try with Chris's patch.
David and I discussed on IRC. It looks like we need to keep writing to the audio stream otherwise the sound hardware stops pulling data from the audio buffers. This results in Available never getting big enough for the frame data to be written to.

So writing as much of the frame data as possible and keeping track of what's written seems to be in order.

Matthew Gregan can probably shed some light here too as he's worked on the libsydneyaudio backend as well.
so is it still worth I test the patch on bug 463627?
For the record, here's what I was showing Chris on IRC.  These are the numbers used for the comparison in nsOggDecodeStateMachine::PlayAudio, both with the original code and with the comparison removed such that we always write.
For the record, when I try the attachment 348885 [details] [diff] [review] in bug 463627, the video just hangs about one second in (though Firefox still works).  With attachment 346881 [details] [diff] [review] in bug 463627, however, the sound and video work.
David can you confirm if attachment 351305 [details] [diff] [review] in bug 463627 fixes your sound problem?
Depends on: 463627
Chris, this patch seems to fix the bug on my computer. I verified : with the trunk, I don't have sound. With the trunk + your patch, I have sound.
Great, thanks for that. I was able to duplicate the issue (or a similar one) on my eee PC and the patch fixes it there too.
Yes, attachment 351305 [details] [diff] [review] also fixes the problem for me.  (I no longer need the change described in comment 3.)
While the title says "No sound", I am actually hearing sound for the first one second of playback.  This is reproducible: hitting refresh or opening a new video in a new tab will again generate the first second of sound.  The examples used above do not have audio within their first second of time.  Suggest changing title to "Sound stops", instead.

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b2)
Gecko/20081201 Firefox/3.1b2
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b2)
Gecko/20081201 Firefox/3.1b2
I've created attachment 352047 [details] [diff] [review] in bug 463627 to solve that bug's problem. I'd be interested to know, if someone is able to test, if that attachment also solves this bug.
This should be fixed in mozilla-central with bug 463627 landed. Can someone confirm?
Is this still an issue? Bug 463627 should have fixed it.
The latest trunk works fine for me, thanks Chris :-)
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Bug 463627 is fixed1.9.1, so marking this one as well.
Keywords: fixed1.9.1
verified fixed on the 1.9.1 branch using  Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2a1pre) Gecko/20090223 Minefield/3.2a1pre. Sound is fine in the site in Comment 0 as well as several other sites tested.
Verified on Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2a1pre) Gecko/20090226 Minefield/3.2a1pre
Status: RESOLVED → VERIFIED
also Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b3pre) Gecko/20090226 Shiretoko/3.1b3pre
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: