[MPlayer-dev-eng] audio decoding questions

Arpi arpi at thot.banki.hu
Tue May 21 11:20:07 CEST 2002


Hi,

> I'm still working on raw dv support (video and file format detection works 
> already, sound partly).
> 
> Well, maybe my problems are very simple, caused by the fact that I usually 
> hack in C++.
> 
> For the video stuff the decode_foo_init() functions can return a "context 
> pointer", which I use to put the decoder (a dv_decoder_t) and some other 
> things in. This "context" can be given to the decode_foo(...); function.
> 
> Such a context doesn't exist for the audio functions. Where should I put my 
> stuff in these cases ? Simply put them globally into my source files ?

not, there are priv fields in structs. you should use sh_audio->context and
sh_video->context in the codecs, and demuxer->priv in the demuxer

they are void* for use to store codec/demuxer specific local data

> My second problem, sound stops after some seconds, and I don't know why.

> decode_frame(start: 0x4058c008, size: 144000, w: 720, h: 576) 6.3% 0 0 0%
> decode_frame(start: 0x4058c008, size: 144000, w: 720, h: 576) 6.2% 0 0 0%
>  aA:  11.2 V:  12.8 A-V: -1.612 ct:  0.958  322/322  59% 13%  6.2% 0 0 0%
> DEMUXER: Too many (59 in 8496000 bytes) audio packets in the buffer!
> (maybe you play a non-interleaved stream/file or the codec failed)
> 
> What's the reason for the "too many..." error message ?

buffer overflow -as the msg says.
you probably ha sproblem with a-v sync, or badly filled in/out byterates,
so it reads audio faster than video, and after few seconds it has too much
audio to store in 8MB buffer.

note that A-V is not 0, it means you have a-v issue too. probably a/v pts is
not set/calculated right?

> After the first of them the sound stops, after the second one mplayer exits.


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu



More information about the MPlayer-dev-eng mailing list