summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
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
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')
-rw-r--r--libmpcodecs/vd_dshow.c8
-rw-r--r--libmpcodecs/vd_vfw.c7
2 files changed, 15 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);
diff --git a/libmpcodecs/vd_vfw.c b/libmpcodecs/vd_vfw.c
index f3f77da9a7..e5f5f1dfa6 100644
--- a/libmpcodecs/vd_vfw.c
+++ b/libmpcodecs/vd_vfw.c
@@ -147,6 +147,13 @@ static int init(sh_video_t *sh){
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;