# HG changeset patch # User rtognimp # Date 1115238921 0 # Node ID 6a7adf41e4fec6c0edd43c28d4c8465b971a660d # Parent 652a50b47214c048257094de7f1387f00862b315 Support for new vssh dll, patch by adland Use new dll only for new files, it can't decode old files (patch by me) diff -r 652a50b47214 -r 6a7adf41e4fe etc/codecs.conf --- a/etc/codecs.conf Wed May 04 19:49:32 2005 +0000 +++ b/etc/codecs.conf Wed May 04 20:35:21 2005 +0000 @@ -1607,7 +1607,16 @@ 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 -r 652a50b47214 -r 6a7adf41e4fe libmpcodecs/vd_dshow.c --- a/libmpcodecs/vd_dshow.c Wed May 04 19:49:32 2005 +0000 +++ b/libmpcodecs/vd_dshow.c Wed May 04 20:35:21 2005 +0000 @@ -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); diff -r 652a50b47214 -r 6a7adf41e4fe libmpcodecs/vd_vfw.c --- a/libmpcodecs/vd_vfw.c Wed May 04 19:49:32 2005 +0000 +++ b/libmpcodecs/vd_vfw.c Wed May 04 20:35:21 2005 +0000 @@ -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;