[MPlayer-users] [BUG] Audio only playing burns CPU (was: OGG audio playing burns CPU)

Filip Kalinski filon at pld.org.pl
Tue Jan 7 14:51:46 CET 2003


On Mon, Jan 06, 2003 at 01:26:35PM +0100, Filip Kalinski wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> On Mon, Jan 06, 2003 at 12:13:05AM +0100, Filip Kalinski wrote:
> > [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> > Hi,
> > 
> > Playing audio-only files (or video with -vo null -vc none) with alsa9
> > output uses 60-80% of CPU time (Duron 800).
> > 
> > What's weird, playing audio+video AVIs uses about 30% of CPU.
> > When ao is oss or sdl:esd playing audio uses less than 10 percent.
> > 
> > Isn't that an odd behavior?
> > 
> > I have alsa 0.9.0rc6 and use via82xx drivers.
> > 
> 
> Oh, I forgot to update message subject, I'm doing it now ;-)
> 

That's me again with the same bug :-)

I have located the problem more closely.

*- 1 -*

When there is no video stream (or if video is turned off with -vo null
-vc none) audio data is passed to output (through filters) in _really small_
chunks (4-30 _bytes_ instead of usual value which is about 8 kilobytes).

Processing that large number of chunks (up to 10000 per second) can eat
all the CPU power easily :-((

If someone with knowledge of alsa output driver could fix it, that would be
great :-)

*- 2 -*

Also, seeking in video files with no video (in audio files it works)
makes mplayer crash is mpg and avi files (and probably others).

Tthe problem of segfaults is that there are unconditional references to
sh_video which is NULL in these cases. But just ignoring references to
sh_video only fixes segfaulting, not seeking, I don't know demuxers code
that good to fix it :-(

-- 
Filip Kalinski <filon at pld.org.pl>



More information about the MPlayer-users mailing list