[MPlayer-dev-eng] [PATCH] demux_real.c : make the mess even

Balatoni Denes pnis at coder.hu
Thu Feb 6 00:35:10 CET 2003


Hi!

> > i originally meant the video packet parser inside a data packet
>
> ah. it was oroginally discovered by Florian, i've cleanuped it and fixed a
> few bugs.
cool, doesn't look like an easy task 

> > > > btw2 there is a hack in demux_real, because without that sound took
> > > > a long time to catch up with the video. This solves it because until
> > > > the first keyframe arrives, the video is still - and by that time
> > > > audio will be in sync with video. Or maybe not - could some one tell
> > > > me what is the real reason than?:)
> > >
> > > which hack?
> >
> > that with I / P frames
>
> hmm?

if(!(s[0]&0x8) || !(s[0]&0x10)){ // P || I  frame -> swap timestamps
	int tmp=kf;			// without this stuff
	kf=priv->kf_pts;              	// if video is much ahead of
	priv->kf_pts=tmp;		// audio at the beginning,
//	if(kf<=tmp) kf=0;		// it takes long time till av-sync goes to 0
    }  



> > what is uncommented, is uncommented for a reason (timestamp calculation
> > is wrong, it made video play too fast)
>
> why is wrong? it works for most files, without it many files won't play
> correctly. it is there by reason.
alright, I only checked one stream dump. 


> > there is no debug stuff afaict
> > or you mean the number of packets reached 0 ?
> > that is no debug, that is a bug there, commented ;)
>
> bug? why?
according to the fine documentation if num of packets
is reached, a new data chunk could be coming (with the
chunk header etc., xine checks for this)

> so if you have real fixes, not hacks and not 'i uncomment this part of code
> because i think it's a cool thing' then send an usable patch.
sure
i don't think it is cool
sorry for sending a patch that fixes something that
works in xine, but not in mplayer
my bad

before telling me these very usefull thoughts, did you actually look at 
demux_real? it is one big hack, nobody knows why stuff is there (as it is
not documented by realnetworks of course), full of gotos and printfs
so I really don't get what you are talking about

and it is not fun resending every patch 5 times, just because one deleted
linebreak hurts your eyes
maybe it is not aesthetic for you, that missing line break breaks the simmetry 
of the printfs or whatever. 

well if you have a lot of time, go ahead and fix it The Right Way - if you
are into duplicating others work, and telling them how lame they are
than you should do that imho

bye
Denes







More information about the MPlayer-dev-eng mailing list