summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
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;