summaryrefslogtreecommitdiffstats
path: root/dec_video.c
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-08-16 01:04:28 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-08-16 01:04:28 +0000
commit4b0e21e35660b032e5101fd146f164887197b0d6 (patch)
treef97efa8d863f5a6927b64ca0539b9259c2fc6a72 /dec_video.c
parent40f28a4215e8b45c67cce076da4cd4118c0edd89 (diff)
downloadmpv-4b0e21e35660b032e5101fd146f164887197b0d6.tar.bz2
mpv-4b0e21e35660b032e5101fd146f164887197b0d6.tar.xz
alloc frame buffer for directshow codec - requires for avifile sync
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1548 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'dec_video.c')
-rw-r--r--dec_video.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/dec_video.c b/dec_video.c
index 7854dace3a..e906591c06 100644
--- a/dec_video.c
+++ b/dec_video.c
@@ -171,6 +171,7 @@ switch(sh_video->codec->driver){
// GUI_MSG( mplCompileWithoutDSSupport )
// exit(1);
#else
+ int bpp;
if(DS_VideoDecoder_Open(sh_video->codec->dll,&sh_video->codec->guid, sh_video->bih, 0, &sh_video->our_out_buffer)){
// if(DS_VideoDecoder_Open(sh_video->codec->dll,&sh_video->codec->guid, sh_video->bih, 0, NULL)){
printf("ERROR: Couldn't open required DirectShow codec: %s\n",sh_video->codec->dll);
@@ -192,15 +193,20 @@ switch(sh_video->codec->driver){
switch(out_fmt){
case IMGFMT_YUY2:
case IMGFMT_UYVY:
+ bpp=16;
DS_VideoDecoder_SetDestFmt(16,out_fmt);break; // packed YUV
case IMGFMT_YV12:
case IMGFMT_I420:
case IMGFMT_IYUV:
+ bpp=12;
DS_VideoDecoder_SetDestFmt(12,out_fmt);break; // planar YUV
default:
+ bpp=((out_fmt&255)+7)&(~7);
DS_VideoDecoder_SetDestFmt(out_fmt&255,0); // RGB/BGR
}
+ sh_video->our_out_buffer = shmem_alloc(sh_video->disp_w*sh_video->disp_h*bpp/8); // FIXME!!!
+
DS_VideoDecoder_Start();
DS_SetAttr_DivX("Quality",divx_quality);