[MPlayer-dev-eng] [PATCH] rff - demux_control patch v1.2
Balatoni Denes
pnis at coder.hu
Sun Nov 10 22:34:00 CET 2002
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi!
> yes.
> (hint: "demuxer API"... do you remember of the beginning of this thread?)
I remember, I just thought that the template you gave was the final. Is that
alread decided how itt will be ? Than I could just as well write this the way
it will be used later.
> > + if((priv->numberofframes=sh_video->video.dwLength)<=1){
> > + // bad video header, try to get it from audio
> > + if(sh_audio) priv->numberofframes=sh_video->fps*sh_audio
> > ->audio.dwLength/sh_audio->wf->nAvgBytesPerSec;
> > + if(priv->numberofframes<=1){
> > + mp_msg(MSGT_SEEK,MSGL_WARN,MSGTR_CouldntDetFNo);
> > + priv->numberofframes=1;
> > + }
> > + }
>
> this looks bad
> - check for nAvgBytesPerSec!=0
> - priv->numberofframes=1; will confuse control()
> - length calc will be INACCURATE when numberofframes calced from audio rate
You are right. Actually I cut&pasted code from demux_avi_seek.
> > - sh_video->i_bps=((float)sh_video->i_bps/(float)sh_video->v
> > ideo.dwLength)*sh_video->fps;
> > + sh_video->i_bps=((float)sh_video->i_bps/(float)priv->numbe
> > rofframes)*sh_video->fps;
>
> why?
This is exaclty how it was calculeted before, only that number of frames
was calculated here (the way you saw it above).
What is your suggestion?
> teh rest looks ok
Cool, I will make the changes you suggested.
Denes
- --
"Use the source Luke !"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE9ztDIaQToeq3jgogRAhrmAJ0Z8wFKYHfQyz/lUA31Kvru8/25GQCfXT1k
C/S0M55vb6OBjlKSzSPsobo=
=fDWv
-----END PGP SIGNATURE-----
More information about the MPlayer-dev-eng
mailing list