summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/codecs.conf11
-rw-r--r--libmpcodecs/vd_dshow.c8
-rw-r--r--libmpcodecs/vd_vfw.c7
3 files changed, 25 insertions, 1 deletions
diff --git a/etc/codecs.conf b/etc/codecs.conf
index 125e499e90..adcbbd8261 100644
--- a/etc/codecs.conf
+++ b/etc/codecs.conf
@@ -1607,7 +1607,16 @@ videocodec vsslight
out BGR24 flip
videocodec vssh264
- info "VSS H.264"
+ info "VSS H.264 New"
+ status working
+ fourcc VSSH
+ driver dshow
+ dll "vsshdsd.dll"
+ guid 0x6931C7e7, 0x75b7, 0x4729, 0xa1, 0x53, 0xa8, 0xad, 0x99, 0xbd, 0xf7, 0x0b
+ out YV12
+
+videocodec vssh264old
+ info "VSS H.264 Old"
status working
fourcc VSSH
driver vfw
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;