[MPlayer-cvslog] r20936 - in trunk: libmpcodecs/vd_ffmpeg.c libmpcodecs/vd_realvid.c libmpdemux/demux_mkv.c libmpdemux/demux_real.c

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sat Nov 25 18:36:52 CET 2006


Hello,
On Tue, Nov 14, 2006 at 11:40:35PM +0100, rtogni wrote:
> Author: rtogni
> Date: Tue Nov 14 23:40:35 2006
> New Revision: 20936
> 
> Modified:
>    trunk/libmpcodecs/vd_ffmpeg.c
>    trunk/libmpcodecs/vd_realvid.c
>    trunk/libmpdemux/demux_mkv.c
>    trunk/libmpdemux/demux_real.c
> 
> Log:
> Fix extradata passing to lavc RV20 decoder
> Pass video codec extradata unchanged from demux_real, sync vd_realvid to 
> the new format
> Sync mkv demuxer to the changes above (cmsg24 extradata was totally 
> broken before)
> Detect cmsg24 size from extradata (was fixed)
> 
> 
> Modified: trunk/libmpcodecs/vd_ffmpeg.c
> ==============================================================================
> --- trunk/libmpcodecs/vd_ffmpeg.c	(original)
> +++ trunk/libmpcodecs/vd_ffmpeg.c	Tue Nov 14 23:40:35 2006
> @@ -354,21 +354,20 @@
>      case mmioFOURCC('R', 'V', '2', '0'):
>      case mmioFOURCC('R', 'V', '3', '0'):
>      case mmioFOURCC('R', 'V', '4', '0'):
> -        avctx->extradata_size= 8;
> -        avctx->extradata = av_mallocz(avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
> -        if(sh->bih->biSize!=sizeof(*sh->bih)+8){
> +        if(sh->bih->biSize<sizeof(*sh->bih)+8){
>              /* only 1 packet per frame & sub_id from fourcc */
> +            avctx->extradata_size= 8;
> +            avctx->extradata = av_mallocz(avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
>  	    ((uint32_t*)avctx->extradata)[0] = 0;
> -	    avctx->sub_id=
>  	    ((uint32_t*)avctx->extradata)[1] =
>          	(sh->format == mmioFOURCC('R', 'V', '1', '3')) ? 0x10003001 : 0x10000000;
>          } else {
>  	    /* has extra slice header (demux_rm or rm->avi streamcopy) */
> -	    unsigned int* extrahdr=(unsigned int*)(sh->bih+1);
> -	    ((uint32_t*)avctx->extradata)[0] = be2me_32(extrahdr[0]);
> -	    avctx->sub_id= extrahdr[1];
> -	    ((uint32_t*)avctx->extradata)[1] = be2me_32(extrahdr[1]);
> +	    avctx->extradata_size = sh->bih->biSize-sizeof(BITMAPINFOHEADER);
> +	    avctx->extradata = av_mallocz(avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
> +	    memcpy(avctx->extradata, sh->bih+1, avctx->extradata_size);
>  	}
> +	avctx->sub_id= be2me_32(avctx->extradata+4);

What is this supposed to do? It does not even compile with icc and the
generic C be2me_32 implementation...
It definitly looks wrong.

Greetings,
Reimar Döffinger



More information about the MPlayer-cvslog mailing list