summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/vd_dshow.c
diff options
context:
space:
mode:
authorrtognimp <rtognimp@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-05-04 20:35:21 +0000
committerrtognimp <rtognimp@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-05-04 20:35:21 +0000
commit4957073078e4466e86424675f2bebec693897d54 (patch)
treef9e13bb590bebe463c2742cfa5296cf6fd88e12d /libmpcodecs/vd_dshow.c
parent8cb44bbc3c66062f0bc081aba1d6e40ede44f71b (diff)
downloadmpv-4957073078e4466e86424675f2bebec693897d54.tar.bz2
mpv-4957073078e4466e86424675f2bebec693897d54.tar.xz
Support for new vssh dll, patch by adland
Use new dll only for new files, it can't decode old files (patch by me) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15345 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/vd_dshow.c')
-rw-r--r--libmpcodecs/vd_dshow.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libmpcodecs/vd_dshow.c b/libmpcodecs/vd_dshow.c
index a91a28ee92..d603b5b7ad 100644
--- a/libmpcodecs/vd_dshow.c
+++ b/libmpcodecs/vd_dshow.c
@@ -50,6 +50,14 @@ static int control(sh_video_t *sh,int cmd,void* arg,...){
// 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);