[MPlayer-users] [BUG] Audio only playing burns CPU (was: OGG
Filip Kalinski
filon at pld.org.pl
Tue Jan 7 21:37:01 CET 2003
On Tue, Jan 07, 2003 at 07:30:31PM +0100, Arpi wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> Hi,
>
> > 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).
>
> the size of teh data chunk is given by teh ao driver!
> see get_space() func.
> maybe you should add a hack to ao_alsa9.c's get_space:
>
> if(space<8192) return 0; else return space;
>
> so it will return 'buffer is full' until there is at least 8k free space.
I have mad the change and it's working great for me! CPU usage dropped
from 70% to 1.5% :-) Thanks! (i will commit it now)
> > 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 :-(
>
> send gdb logs to me, esp. about where are those unconditional sh_video
> references. the OSD should be disabled for audio-only files.
Huh? What do have OSD to do with the case I described?
Anyway, I have prepared gdb output, but the bugs are easy to spot.
Demuxers are just not designed to use without video stream.
In demux_avi there is:
demux_seek_avi (demuxer=0x8474e40, rel_seek_secs=10, flags=0) at demux_avi.c:628
628 int rel_seek_frames=rel_seek_secs*sh_video->fps;
in demux_mpeg:
0x0818540f in demux_seek_mpg (demuxer=0x8476038, rel_seek_secs=-nan(0x400000), flags=0) at demux_mpg.c:365
365 if(!sh_video->i_bps) // unspecified or VBR
And when run mplayer <file> -vo null -vc none sh_video is null...
--
Filip Kalinski <filon at pld.org.pl>
More information about the MPlayer-users
mailing list