[MPlayer-cvslog] CVS: main/libmpcodecs vd_dshow.c, 1.9, 1.10 vd_vfw.c, 1.25, 1.26

Roberto Togni CVS syncmail at mplayerhq.hu
Wed May 4 22:35:23 CEST 2005


CVS change done by Roberto Togni CVS

Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var2/tmp/cvs-serv3307/libmpcodecs

Modified Files:
	vd_dshow.c vd_vfw.c 
Log Message:
Support for new vssh dll, patch by adland
Use new dll only for new files, it can't decode old files (patch by me)


Index: vd_dshow.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_dshow.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- vd_dshow.c	6 Jul 2004 11:14:28 -0000	1.9
+++ vd_dshow.c	4 May 2005 20:35:21 -0000	1.10
@@ -50,6 +50,14 @@
 // init driver
 static int init(sh_video_t *sh){
     unsigned int out_fmt;
+
+    /* Hack for VSSH codec: new dll can't decode old files
+     * In my samples old files have no extradata, so use that info
+     * to decide what dll should be used (here and in vd_vfw).
+     */
+    if (!strcmp(sh->codec->dll, "vsshdsd.dll") && (sh->bih->biSize == 40))
+      return 0;
+
     if(!(sh->context=DS_VideoDecoder_Open(sh->codec->dll,&sh->codec->guid, sh->bih, 0, 0))){
         mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_MissingDLLcodec,sh->codec->dll);
         mp_msg(MSGT_DECVIDEO,MSGL_HINT,MSGTR_DownloadCodecPackage);

Index: vd_vfw.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vd_vfw.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- vd_vfw.c	6 Nov 2002 23:54:24 -0000	1.25
+++ vd_vfw.c	4 May 2005 20:35:21 -0000	1.26
@@ -147,6 +147,13 @@
     int i, o_bih_len;
     vd_vfw_ctx *priv;
   
+    /* Hack for VSSH codec: new dll can't decode old files
+     * In my samples old files have no extradata, so use that info
+     * to decide what dll should be used (here and in vd_dshow).
+     */
+    if (!strcmp(sh->codec->dll, "vssh264.dll") && (sh->bih->biSize > 40))
+      return 0;
+
     priv = malloc(sizeof(vd_vfw_ctx));
     if (!priv)
 	return 0;




More information about the MPlayer-cvslog mailing list