[MPlayer-dev-eng] Any plan to add libavformat mencoder -of driver?

Michael Niedermayer michaelni at gmx.at
Mon Feb 21 13:24:27 CET 2005


Hi

On Sunday 20 February 2005 19:19, Nico Sabbi wrote:
> Michael Niedermayer wrote:
> >>Michael, is there any way to separate muxer and stream writer in lavf?
> >>Their binding requires ugly changes in mencoder.c that I'd like to avoid.
> >
> >yes, u must implement a URLProtocol (see demux_lavf.c)
> >and then just add a "<name_of_protocol>://" prefix to the filename, lavf
> > will then call the write / open / close / seek functions of the
> > URLProtocol which in turn will call mplayers/libcs functions
> >
> >[...]
>
> done, but  now I always get crashes: the write function is never called,
> and additionally av_write_header() for avi, mov and asf segfaults (null ptr
> dereference
> of s->buf_ptr in put_byte()).
> The other formats (mpeg*) lock forever after a couple of
> muxer_write_chunk().
> Michael, what's wrong with this patch?

s/priv->pb/priv->oc->pb/

and

+  fmt = guess_format(NULL, out_filename, NULL);
-  fmt = guess_format(out_filename, NULL, NULL);

and IMHO this should be commited ASAP so its easier to test/debug/improve
though iam not sure why many of the changes in mencoder.c and muxer.c/h are 
needed, maybe you could elaborate on these?

[...]
-- 
Michael

"nothing is evil in the beginning. Even Sauron was not so." -- Elrond




More information about the MPlayer-dev-eng mailing list