changeset 7126:d3fd5d568594

passing extra stuff from real stuff to lavc
author michael
date Wed, 28 Aug 2002 22:02:38 +0000
parents 3aeb57cc8ac6
children 1e47c2e7aa8e
files libmpcodecs/vd_ffmpeg.c
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd_ffmpeg.c	Wed Aug 28 21:55:44 2002 +0000
+++ b/libmpcodecs/vd_ffmpeg.c	Wed Aug 28 22:02:38 2002 +0000
@@ -183,6 +183,16 @@
 #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);