[MPlayer-dev-eng] [PATCH] vfw fixes
Gianluigi Tiesi
mplayer at netfarm.it
Mon Sep 17 01:02:49 CEST 2007
On Sun, Sep 16, 2007 at 09:37:34PM +0200, Reimar D?ffinger wrote:
> Hello,
> On Sun, Sep 16, 2007 at 09:05:09PM +0200, Gianluigi Tiesi wrote:
> [...]
> > ret is needed to print the return code of the function,
>
> Sorry missed that. Handle it however you like then. Just the other
> things, tabs and comment out return then.
>
Ok it should be fine now
Regards
--
Gianluigi Tiesi <sherpya at netfarm.it>
EDP Project Leader
Netfarm S.r.l. - http://www.netfarm.it/
Free Software: http://oss.netfarm.it/
-------------- next part --------------
diff -NuBr -x.svn -xhelp_mp.h -xlibdha -x'*.so' -x'*.log' -x'*.a' -x'*.exe' -x'*.o' -xconfigure.log -xconfig.mak -x.cvsignore -xconfig.h -xcodecs.conf.h -xversion.h -x.depend main/libmpcodecs/ve_vfw.c sherpya/libmpcodecs/ve_vfw.c
--- main/libmpcodecs/ve_vfw.c 2007-09-13 20:41:05.750000000 +0200
+++ sherpya/libmpcodecs/ve_vfw.c 2007-09-17 00:29:26.578125000 +0200
@@ -295,6 +295,23 @@
return 1;
}
+static void uninit(struct vf_instance_s* vf)
+{
+ HRESULT ret;
+
+ if(encoder_hic){
+ if(encoder_buf){
+ ret=ICCompressEnd(encoder_hic);
+ if(ret) mp_msg(MSGT_WIN32, MSGL_WARN, "ICCompressEnd failed: %ld\n", ret);
+ free(encoder_buf);
+ encoder_buf=NULL;
+ }
+ ret=ICClose(encoder_hic);
+ if(ret) mp_msg(MSGT_WIN32, MSGL_WARN, "ICClose failed: %ld\n", ret);
+ encoder_hic=0;
+ }
+}
+
//===========================================================================//
static int vf_open(vf_instance_t *vf, char* args){
@@ -303,6 +320,7 @@
vf->control=control;
vf->query_format=query_format;
vf->put_image=put_image;
+ vf->uninit=uninit;
vf->priv=malloc(sizeof(struct vf_priv_s));
memset(vf->priv,0,sizeof(struct vf_priv_s));
vf->priv->mux=(muxer_stream_t*)args;
More information about the MPlayer-dev-eng
mailing list