Closed Bug 461281 Opened 16 years ago Closed 16 years ago

CPU usage goes to 100% after playing some Ogg files

Categories

(Core :: Audio/Video, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: cajbir, Assigned: cajbir)

References

()

Details

Attachments

(4 files)

Attached file testcase
Steps to reproduce: 1) Create an html file with the following: <video src='http://www.double.co.nz/video_test/ufohit.ogg' controls></video> 2) Load html file and use the built in controls to play. What happens: Sound plays, then the cpu usage goes to 100% and stays there. What should happen: Sounds plays, cpu usage drops to zero. See testcase for html file.
According to oggz-validate the .ogg file has no end of stream marker. I tested a number of ogg files without an eos and they all have this issue.
Attached patch Fixes bugSplinter Review
nsChannelReader was not correctly implementing the liboggplay reader interface in cases of the read returning zero bytes.
Attachment #344423 - Flags: superreview?(roc)
Attachment #344423 - Flags: review?(roc)
Attachment #344424 - Flags: superreview?(roc)
Attachment #344424 - Flags: review?(roc)
Blocks: 461286
Attachment #344423 - Flags: superreview?(roc)
Attachment #344423 - Flags: superreview+
Attachment #344423 - Flags: review?(roc)
Attachment #344423 - Flags: review+
Comment on attachment 344424 [details] [diff] [review] Binary file required for test reviewing binary data blobs is silly :-)
Attachment #344424 - Flags: superreview?(roc)
Attachment #344424 - Flags: superreview+
Attachment #344424 - Flags: review?(roc)
Attachment #344424 - Flags: review+
Linux mozilla-central moz2-linux-slave08 dep unit test on 2008/10/23 02:34:27 *** 27381 INFO Running /tests/content/media/video/test/test_bug461281.html... ALSA lib confmisc.c:670:(snd_func_card_driver) cannot find card '0' NEXT ERROR ALSA lib conf.c:3479:(_snd_config_evaluate) function snd_func_card_driver returned error: No such device ALSA lib confmisc.c:391:(snd_func_concat) error evaluating strings ALSA lib conf.c:3479:(_snd_config_evaluate) function snd_func_concat returned error: No such device ALSA lib confmisc.c:1070:(snd_func_refer) error evaluating name ALSA lib conf.c:3479:(_snd_config_evaluate) function snd_func_refer returned error: No such device ALSA lib conf.c:3947:(snd_config_expand) Evaluate error: No such device ALSA lib pcm.c:2143:(snd_pcm_open_noupdate) Unknown PCM default
It looks like the code handled the lack of an audio device ok, and in fact the test passed. Unfortunately alsa is noisy and printed to the stderr/stdout that it failed to find the device and the unit test box sees the word 'error' there - or sees it as unexpected output.
I found out how to disable the noisy alsa output. I'll disuss with the libsydneyaudio maintainers to see what's the best way to include this, and when I get a fix for it, re-commit this patch.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Comment on attachment 344423 [details] [diff] [review] Fixes bug + if (!NS_SUCCEEDED(rv)) { fwiw, that should be if (NS_FAILED(rv))
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: