comparison libmpcodecs/vf_scale.c @ 11537:93a76eee7657

uninit support
author alex
date Sat, 29 Nov 2003 19:40:30 +0000
parents 3b9f8ee18ff9
children 272fc35fd8ee
comparison
equal deleted inserted replaced
11536:017a7e90fcf1 11537:93a76eee7657
377 } 377 }
378 } 378 }
379 return 0; // nomatching in-fmt 379 return 0; // nomatching in-fmt
380 } 380 }
381 381
382 static void uninit(struct vf_instance_s *vf){
383 if(vf->priv->ctx) sws_freeContext(vf->priv->ctx);
384 if(vf->priv->palette) free(vf->priv->palette);
385 free(vf->priv);
386 }
387
382 static int open(vf_instance_t *vf, char* args){ 388 static int open(vf_instance_t *vf, char* args){
383 vf->config=config; 389 vf->config=config;
384 vf->start_slice=start_slice; 390 vf->start_slice=start_slice;
385 vf->draw_slice=draw_slice; 391 vf->draw_slice=draw_slice;
386 vf->put_image=put_image; 392 vf->put_image=put_image;
387 vf->query_format=query_format; 393 vf->query_format=query_format;
388 vf->control= control; 394 vf->control= control;
395 vf->uninit=uninit;
389 if(!vf->priv) { 396 if(!vf->priv) {
390 vf->priv=malloc(sizeof(struct vf_priv_s)); 397 vf->priv=malloc(sizeof(struct vf_priv_s));
391 // TODO: parse args -> 398 // TODO: parse args ->
392 vf->priv->ctx=NULL; 399 vf->priv->ctx=NULL;
393 vf->priv->w= 400 vf->priv->w=