[Mplayer-cvslog] CVS: main dec_video.c,1.25,1.26

Arpi of Ize arpi at mplayer.dev.hu
Thu Aug 16 03:04:31 CEST 2001


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv16658

Modified Files:
	dec_video.c 
Log Message:
alloc frame buffer for directshow codec - requires for avifile sync

Index: dec_video.c
===================================================================
RCS file: /cvsroot/mplayer/main/dec_video.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- dec_video.c	14 Aug 2001 18:28:56 -0000	1.25
+++ dec_video.c	16 Aug 2001 01:04:28 -0000	1.26
@@ -171,6 +171,7 @@
 //   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,14 +193,19 @@
    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();
 




More information about the MPlayer-cvslog mailing list