[MPlayer-dev-eng] Re: [PATCH] enable -ss option on wmv streams

Alban Bedel albeu at free.fr
Sat Jan 31 10:09:30 CET 2004


Hi Alex Beregszaszi,

on Wed, 28 Jan 2004 11:51:17 +0100 you wrote:

> Hi,
> 
> > This patch enables the -ss option to cause a wmv stream to start at
> > the specified position instead of at the beginning when the stream is
> > first being opened.  I used snort to reverse engineer the solution and
> > I'm not sure that I solved it the best way, but it does work well for
> > my online classes.  As far as I can tell, there is no way to seek
> > after the stream has been already opened, so this works differently
> > than most seeking code I have seen in mplayer.  I welcome any
> > feedback.
> Someone familiar with that code?

Not that much but it seems ok. I'm wondering why the stream_time
variable is not a simple local inside the func. Also seek_to_sec is
a string option, so it must be freed otherwise that leak some mem.
 
> The bad part is that mplayer is getting too chaotic by using more and
> more global symbols...

The problem here is that you need -aid/-vid and -ss during stream opening.
I remeber that in one of my first patch i turned the var for -aid and -vid
global to access them during stream opening. At that time Arpi said it
was ok for the momment but that should be passed trough func args.
2 years later nothing changed regarding this and i doubt it will really
change soon. So it's this simple patch or some big changes witch are not
worse the work, especially considering the state of libmpdemux.

	Albeu
-- 

Everything is controlled by a small evil group
to which, unfortunately, no one we know belongs.





More information about the MPlayer-dev-eng mailing list