[Mplayer-cvslog] CVS: main/libmpcodecs vf_pp.c,1.11,1.12
Michael Niedermayer
michael at mplayerhq.hu
Tue Oct 29 02:21:06 CET 2002
Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv32604
Modified Files:
vf_pp.c
Log Message:
fixing segfault
Index: vf_pp.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_pp.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- vf_pp.c 28 Oct 2002 19:31:04 -0000 1.11
+++ vf_pp.c 29 Oct 2002 01:20:51 -0000 1.12
@@ -25,13 +25,15 @@
static int config(struct vf_instance_s* vf,
int width, int height, int d_width, int d_height,
unsigned int voflags, unsigned int outfmt){
-
- if(vf->priv->context) freePPContext(vf->priv->context);
vf->priv->context= getPPContext(width, height);
return vf_next_config(vf,width,height,d_width,d_height,voflags,vf->priv->outfmt);
}
+static void uninit(struct vf_instance_s* vf){
+ if(vf->priv->context) freePPContext(vf->priv->context);
+}
+
static int query_format(struct vf_instance_s* vf, unsigned int fmt){
switch(fmt){
case IMGFMT_YV12:
@@ -118,8 +120,10 @@
vf->config=config;
vf->get_image=get_image;
vf->put_image=put_image;
+ vf->uninit=uninit;
vf->default_caps=VFCAP_ACCEPT_STRIDE|VFCAP_POSTPROC;
vf->priv=malloc(sizeof(struct vf_priv_s));
+ vf->priv->context=NULL;
// check csp:
vf->priv->outfmt=vf_match_csp(&vf->next,fmt_list,IMGFMT_YV12);
More information about the MPlayer-cvslog
mailing list