[MPlayer-dev-eng] [PATCH]Extradata for mp4v over X-QT in rtsp streams

Nico Sabbi nicola_sabbi at fastwebnet.it
Tue Feb 6 22:08:22 CET 2007


Carl Eugen Hoyos wrote:
> Hi!
> 
> Attached patch adds extradata handling for rtsp streams containing mp4v
> in X-QT.
> Sample stream:
> rtsp://a354.q.kamai.net/3/354/187/427203ac/1a1a1a28970d76db4e7ced61d70566d646b21745a81784b3208f056ed34675df4bc02997002f9a036ed93eb0167bee62910377ea5a/joe_satriani_20050407_300.mov
> 
> Please review and apply, Carl Eugen
> 
> 
> 
> ------------------------------------------------------------------------
> 
> Index: libmpdemux/demux_rtp_codec.cpp
> ===================================================================
> --- libmpdemux/demux_rtp_codec.cpp	(Revision 22133)
> +++ libmpdemux/demux_rtp_codec.cpp	(Arbeitskopie)
> @@ -91,6 +91,7 @@
>      bih->biWidth = qtRTPSource->qtState.width;
>      bih->biHeight = qtRTPSource->qtState.height;
>      if (bih->biCompression == mmioFOURCC('a','v','c','1') ||
> +        bih->biCompression == mmioFOURCC('m','p','4','v') ||
>          bih->biCompression == mmioFOURCC('S','V','Q','3')) {
>        uint8_t *pos = (uint8_t*)qtRTPSource->qtState.sdAtom + 86;
>        uint8_t *endpos = (uint8_t*)qtRTPSource->qtState.sdAtom
> @@ -98,7 +99,9 @@
>        while (pos+8 < endpos) {
>          unsigned atomLength = pos[0]<<24 | pos[1]<<16 | pos[2]<<8 | pos[3];
>          if (atomLength == 0 || atomLength > endpos-pos) break;
> -        if ((!memcmp(pos+4, "avcC", 4) || !memcmp(pos+4, "SMI ", 4)) &&
> +        if ((!memcmp(pos+4, "avcC", 4) || 
> +             !memcmp(pos+4, "esds", 4) || 
> +             !memcmp(pos+4, "SMI ", 4)) &&
>              atomLength > 8 &&
>              atomLength <= INT_MAX-sizeof(BITMAPINFOHEADER)) {
>            bih->biSize = sizeof(BITMAPINFOHEADER)+atomLength-8;
> 

it looks good to me, if no one objects I'll commit it tomorrow

-- 
"Without a frontend, mplayer is useless" - someone in mplayer-users



More information about the MPlayer-dev-eng mailing list