[MPlayer-cvslog] r19409 - trunk/libmpcodecs/dec_audio.c

Ivo ivop at euronet.nl
Fri Oct 6 23:37:18 CEST 2006


On Wednesday 04 October 2006 17:33, Uoti Urpala wrote:
> On Tue, 2006-08-15 at 22:06 +0200, ivo wrote:
> > display correct audio bitrate, samplerate and number of channels once
> > they are known for mplayer -identify
> >
> > --- trunk/libmpcodecs/dec_audio.c	(original)
> > +++ trunk/libmpcodecs/dec_audio.c	Tue Aug 15 22:06:31 2006
> > @@ -112,6 +112,9 @@
> >  	af_fmt2str_short(sh_audio->sample_format),
> > 
> > 	sh_audio->i_bps*8*0.001,((float)sh_audio->i_bps/sh_audio->o_bps)*100.0
> >, sh_audio->i_bps,sh_audio->o_bps);
> > + 
> > mp_msg(MSGT_IDENTIFY,MSGL_INFO,"ID_AUDIO_BITRATE=%d\nID_AUDIO_RATE=%d\n
> >" +    "ID_AUDIO_NCH=%d\n", sh_audio->i_bps, sh_audio->samplerate, +   
> > sh_audio->channels );
>
> mplayer.c also has lines printing these (though in some cases the values
> are apparently not initialized by then), so they're printed twice. Are
> both needed?

Not really IMHO. It might lead to bugs in applications using the numbers, 
like the one just reported on mencoder-users, and only scan for the first 
occurrence of a label, ignoring any "update" that might come later when at 
one frame has been decoded.

> There's a '* 8' missing from the ID_AUDIO_BITRATE value, now it prints
> bytes/s.

Yep, I need to fix that.

--Ivo



More information about the MPlayer-cvslog mailing list