[MPlayer-dev-eng] [PATCH] add ve_vfw uninit
Rock Clef
g.clef417 at gmail.com
Wed May 9 13:59:07 CEST 2007
this is vfw uininit patch
.sst output correct at VP6 twopass firstpass.
sorry ..unskilled English
Index: libmpcodecs/ve_vfw.c
===================================================================
--- libmpcodecs/ve_vfw.c (revision 23277)
+++ libmpcodecs/ve_vfw.c (working copy)
@@ -295,6 +295,26 @@
return 1;
}
+static void uninit(struct vf_instance_s* vf){
+
+ HRESULT ret;
+
+ if (encoder_hic != 0 && encoder_buf != NULL) {
+ ret = ICCompressEnd(encoder_hic);
+ if(ret){
+ mp_msg(MSGT_WIN32, MSGL_WARN, "ICCompressEnd failed: %ld\n",
ret);
+ return;
+ }
+ ret = ICClose(encoder_hic);
+ if(ret){
+ mp_msg(MSGT_WIN32, MSGL_WARN, "ICClose failed: %ld\n", ret);
+ return;
+ }
+
+ free(encoder_buf);
+ }
+}
+
//===========================================================================//
static int vf_open(vf_instance_t *vf, char* args){
@@ -303,6 +323,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