[MPlayer-dev-eng] Two questions about the correct behaviour of demuxers

Matteo Giani matgiani at ctonet.it
Thu Sep 26 20:04:31 CEST 2002


Two questions came to my mind while working on my PVA demuxer, about the 
behaviour MPlayer expects:

*    Does the demuxer have to behave in some particular way when 
-nosound is specified on commandline, or is it in a later stage that the 
audio data is discarded? I ask this because in order to make -nosound 
work I had to change my demux_open function so that it checks for 
demuxer->audio->id >=-1 and does not create the sh_audio structure if it 
is false (-noaudio sets demuxer->audio->id to -2, doesn't it?). Is this 
the correct way?

*    Is it a problem if the demuxer delivers more than one 
demux_packet_t in one call of demux_fill_buffer() ? This one came to my 
mind while testing my demuxer with -dumpaudio/dumpvideo. It exits 
complaining about "too many video(/audio) packets in the buffer", after 
a variable amount of time depending on the file. Since in some 
situations it might happen that it delivered two video packets in the 
same fill_buffer call, I thought it might be the problem. But even 
modifying that did not help. I wonder if the demuxer somhow has to know 
if -dumpaudio/video has been called and behave accordingly (discarding 
the data you're not dumping...), but I didn't seem to find anything like 
this in other demuxers (I admit I just had a quick look).

Thanks for all your help.

Matteo Giani




More information about the MPlayer-dev-eng mailing list