diff options
author | rtogni <rtogni@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-10-28 22:32:20 +0000 |
---|---|---|
committer | rtogni <rtogni@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-10-28 22:32:20 +0000 |
commit | ec70a0fbbd0d398e1baf9abf194b406a60d5a4b3 (patch) | |
tree | 98830658bde4d27796670b2906bb668908e4cd9d /libmpcodecs | |
parent | d08a99c12a393c63de352ae70213e6b7919758fb (diff) | |
download | mpv-ec70a0fbbd0d398e1baf9abf194b406a60d5a4b3.tar.bz2 mpv-ec70a0fbbd0d398e1baf9abf194b406a60d5a4b3.tar.xz |
Change the frame format passed to lavc realvideo decoders to adapt for
the changes in r10825.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24882 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/vd_ffmpeg.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index dce218204d..6124429036 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -760,22 +760,19 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){ || sh->format == mmioFOURCC('R', 'V', '2', '0') || sh->format == mmioFOURCC('R', 'V', '3', '0') || sh->format == mmioFOURCC('R', 'V', '4', '0')) - if(sh->bih->biSize>=sizeof(*sh->bih)+8){ - int i; + { dp_hdr_t *hdr= (dp_hdr_t*)data; - uint32_t *offsets = (uint32_t*)(data + hdr->chunktab) + 1; - char *end = data + len; - - if(avctx->slice_offset==NULL) - avctx->slice_offset= av_malloc(sizeof(int)*1000); - -// for(i=0; i<25; i++) printf("%02X ", ((uint8_t*)data)[i]); - - avctx->slice_count= FFMIN(hdr->chunks+1, 1000); - for(i=0; i<avctx->slice_count && end >= &offsets[2*i+1]; i++) - avctx->slice_offset[i]= offsets[2*i]; - len=hdr->len; - data+= sizeof(dp_hdr_t); + uint32_t *offsets = (uint32_t*)(data + hdr->chunktab); + uint8_t *offstab = av_malloc((hdr->chunks+1) * 8); + uint8_t *buf = data; + int chunks = hdr->chunks; + int dlen = hdr->len; + + buf[0] = chunks; + memcpy(offstab, offsets, (chunks + 1) * 8); + memmove(buf + 1 + (chunks + 1) * 8, data + sizeof(dp_hdr_t), dlen); + memcpy(buf + 1, offstab, (chunks + 1) * 8); + av_free(offstab); } mp_msg(MSGT_DECVIDEO, MSGL_DBG2, "vd_ffmpeg data: %04x, %04x, %04x, %04x\n", |