[MPlayer-dev-eng] [PATCH] make lavf demuxer and mplayer demuxer return same format extradata.

elupus elupus at ecce.se
Wed Nov 1 21:35:00 CET 2006


Hi, 

Here's a patch that partially fixes invalid_fps_broken_video_lavc.rm in
incomming. 

The file in question won't play correctly unless external video codec is
used and mplayer real demuxer, no other combination. There was a mismatch in
the byteorder of extradata between lavf and mplayer real demuxer. This is
changed to keep extradata in same order as was read from file (this is how
lavf does it).

Secondly, there was another mismatch between lavf and internal demuxer on
the idea of how packets look. Internal real demuxer prepends a header wich
gives information on video slices. It doesn't look like lavf does this, (or
it's in some different format). By skipping the setup of slice_offset in
avctx (when demuxing with lavf) it decodes the video without complaining all
too much. It's not a complete solution since having two methods for passing
packets that differ depending on demuxer isn't a good idea, but rewriting
this in demux_real.c is out of my liege.

There is still a third problem here and that is vd_realvid.c can't decode
any data as demuxed by lavf. Since it expects that extra header in the data
to give to decoder, it just segfaults when it's fed data from lavf.

So this patch gives us.
lavf,         lavc   -> slow and choppy
lavf,         dll    -> segfault
demux_real.c  lavc   -> choppy but correct speed (default)
demux_real.c  dll    -> choppy but correct speed

There is also another problem with that file, it has a fps of 30 as given by
mplayer and 12 as given by lavf, but actually has a fps of 15 if one go by
it's timestamps. mplayer's demuxer almost get's it right with very choppy
playback, -fps 15 fixes that. Lavf on the other had seem to mess up the
timestamps royally, but I suppose that will be for another mailing list. 

/Joakim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: real2.patch
Type: application/octet-stream
Size: 8032 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20061101/50a3cf15/attachment.obj>


More information about the MPlayer-dev-eng mailing list