[MPlayer-dev-eng] patch for mencoder

Diego Biurrun diego at biurrun.de
Mon Jul 25 20:45:36 CEST 2005


Ross, can you review/apply this, please?

Thanks

Diego

On Sun, Jul 17, 2005 at 12:22:25AM +0500, Sergey Khlutchin wrote:
> This patch is for more correct avi headers
> 
> Sergey Khlutchin

> diff -durN MPlayer-1.0pre7/libmpdemux/demux_rtp_codec.cpp MPlayer-1.0pre7-elphel-1/libmpdemux/demux_rtp_codec.cpp
> --- MPlayer-1.0pre7/libmpdemux/demux_rtp_codec.cpp	2003-11-06 09:55:52.000000000 +0400
> +++ MPlayer-1.0pre7-elphel-1/libmpdemux/demux_rtp_codec.cpp	2005-04-17 16:30:30.000000000 +0500
> @@ -47,6 +47,16 @@
>        = mmioFOURCC('H','2','6','1');
>      needVideoFrameRate(demuxer, subsession);
>    } else if (strcmp(subsession->codecName(), "JPEG") == 0) {
> +    unsigned char* packetData; unsigned packetDataLen; float pts;
> +    do {
> +      if (!awaitRTPPacket(demuxer, demuxer->video,
> +              packetData, packetDataLen, pts)) {
> +        return;
> +      }
> +    } while ((packetData[0]!=0xff) || (packetData[1]!=0xd8)); //SOI marker
> +// disp_h, disp_w - just the initial display size
> +    sh_video->disp_h=bih->biHeight=  (((int) packetData[0xa3]) << 8) | packetData[0xa4];
> +    sh_video->disp_w=bih->biWidth= (((int) packetData[0xa5]) << 8) | packetData[0xa6];
>      bih->biCompression = sh_video->format
>        = mmioFOURCC('M','J','P','G');
>      needVideoFrameRate(demuxer, subsession);




More information about the MPlayer-dev-eng mailing list