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

Roberto Togni rxt at rtogni.it
Thu Nov 9 23:04:00 CET 2006


On Wed, 8 Nov 2006 23:44:42 +0100
Roberto Togni <rxt at rtogni.it> wrote:

> On Sun, 5 Nov 2006 14:15:45 +0100
> "elupus" <elupus at ecce.se> wrote:
> 
> [...]
> > I noted something else on that cmsg24 data.
> > 
> >           if (bih->biCompression <= 0x30335652 && type2 >= 0x20200002)
> >             {
> >               /* read secondary WxH for the cmsg24[] (see vd_realvid.c) */
> >               ((unsigned short *)(bih+1))[4] = 4 * (unsigned short) src[0];
> >               ((unsigned short *)(bih+1))[5] = 4 * (unsigned short) src[1];
> >             }
> >           else
> >             memset(&dst[8], 0, 4);
> >           track->realmedia = 1;
> > 
> > That is in demux_mkv.c, and then vd_realvid.c it uses that extradata for
> > cmsg24 and once again multiplies it with 4. Thus the final change would be
> > 8.
> 
> Hmm, this looks totally broken (unless mkv stores real codecs
> extradata in a different way than rm does).
> 1 - as you noted, the W and H for cmsg24 are already multiplied by 4 in
> vd_realvid
> 2 - it passes only the 1st WH pair (i have seen up to 8 values passed
> to cmsg24)
> 3 - it passes them as shorts (2 bytes), while vd_realvid expects chars
> 
> So why does it work now? because i found only one sample (RV20 in rm,
> not mkv) that requires them, and even that file uses only the 1st pair.
> 

Hmm, 1000l to me. Real demuxer was the same, when i fixed it (Jan 22
2005) i didn't fixed mkv :)

Ciao,
 Roberto



More information about the MPlayer-dev-eng mailing list