[Mplayer-cvslog] CVS: main/libmpcodecs vf_scale.c,1.3,1.4
Arpi of Ize
arpi at mplayer.dev.hu
Mon Apr 8 01:31:02 CEST 2002
Update of /cvsroot/mplayer/main/libmpcodecs
In directory mplayer:/var/tmp.root/cvs-serv9636
Modified Files:
vf_scale.c
Log Message:
free old context, really use query_format
Index: vf_scale.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_scale.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- vf_scale.c 7 Apr 2002 22:45:07 -0000 1.3
+++ vf_scale.c 7 Apr 2002 23:30:59 -0000 1.4
@@ -37,6 +37,7 @@
unsigned int flags, unsigned int outfmt){
unsigned int* p=outfmt_list;
unsigned int best=0;
+
// find the best outfmt:
while(*p){
int ret=vf_next_query_format(vf,*p);
@@ -57,6 +58,9 @@
printf("SwScale scaling %dx%d %s to %dx%d %s \n",
width,height,vo_format_name(outfmt),
vf->priv->w,vf->priv->h,vo_format_name(best));
+
+ // free old ctx:
+ if(vf->priv->ctx) freeSwsContext(vf->priv->ctx);
// new swscaler:
vf->priv->ctx=getSwsContextFromCmdLine(width,height,outfmt,
@@ -108,6 +112,7 @@
static int open(vf_instance_t *vf, char* args){
vf->config=config;
vf->put_image=put_image;
+ vf->query_format=query_format;
vf->priv=malloc(sizeof(struct vf_priv_s));
// TODO: parse args ->
vf->priv->ctx=NULL;
More information about the MPlayer-cvslog
mailing list