From f4e1671be7e80209be7bc9179c0d64cb1234af20 Mon Sep 17 00:00:00 2001 From: michael Date: Wed, 28 Aug 2002 22:02:38 +0000 Subject: [PATCH] passing extra stuff from real stuff to lavc git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7127 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vd_ffmpeg.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index 7a9e338f90..8c9504341b 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -183,6 +183,16 @@ static int init(sh_video_t *sh){ #endif } #endif + if( sh->format == mmioFOURCC('R', 'V', '1', '0') + || sh->format == mmioFOURCC('R', 'V', '1', '3')){ + unsigned int* extrahdr=(unsigned int*)(sh->bih+1); + avctx->extradata_size= 8; + avctx->extradata = malloc(avctx->extradata_size); + ((uint32_t*)avctx->extradata)[0] = extrahdr[0]; + ((uint32_t*)avctx->extradata)[1] = extrahdr[1]; +// printf("%X %X %d %d\n", extrahdr[0], extrahdr[1]); + } + /* open it */ if (avcodec_open(avctx, lavc_codec) < 0) { mp_msg(MSGT_DECVIDEO,MSGL_ERR, MSGTR_CantOpenCodec);