passing extra stuff from real stuff to lavc

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7127 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
michael 2002-08-28 22:02:38 +00:00
parent ac75309246
commit f4e1671be7
1 changed files with 10 additions and 0 deletions

View File

@ -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);