changeset 11537:93a76eee7657

uninit support
author alex
date Sat, 29 Nov 2003 19:40:30 +0000
parents 017a7e90fcf1
children b8f161ce13db
files libmpcodecs/vf_scale.c
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vf_scale.c	Sat Nov 29 19:34:26 2003 +0000
+++ b/libmpcodecs/vf_scale.c	Sat Nov 29 19:40:30 2003 +0000
@@ -379,6 +379,12 @@
     return 0;	// nomatching in-fmt
 }
 
+static void uninit(struct vf_instance_s *vf){
+    if(vf->priv->ctx) sws_freeContext(vf->priv->ctx);
+    if(vf->priv->palette) free(vf->priv->palette);
+    free(vf->priv);
+}
+
 static int open(vf_instance_t *vf, char* args){
     vf->config=config;
     vf->start_slice=start_slice;
@@ -386,6 +392,7 @@
     vf->put_image=put_image;
     vf->query_format=query_format;
     vf->control= control;
+    vf->uninit=uninit;
     if(!vf->priv) {
     vf->priv=malloc(sizeof(struct vf_priv_s));
     // TODO: parse args ->