summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authoriive <iive@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-08-23 09:52:25 +0000
committeriive <iive@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-08-23 09:52:25 +0000
commiteaa8aeddebb28544c97f947412176606c27e16b0 (patch)
tree68f38499042cfffc13e5c3ba35f9f8b59bc8f015 /libvo
parentf7e124ccdb27e5d446923af9d63cafd5a013a9d5 (diff)
downloadmpv-eaa8aeddebb28544c97f947412176606c27e16b0.tar.bz2
mpv-eaa8aeddebb28544c97f947412176606c27e16b0.tar.xz
prevent XFree execution on wrong condition
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13102 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_xvmc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libvo/vo_xvmc.c b/libvo/vo_xvmc.c
index cd22ecc2ba..2c95d20746 100644
--- a/libvo/vo_xvmc.c
+++ b/libvo/vo_xvmc.c
@@ -207,8 +207,8 @@ int attrib_count,i;
if(keycolor_handling == AUTO_COLORKEY){
//XV_AUTOPING_COLORKEY doesn't work for XvMC yet(NVidia 43.63)
attributes = XvQueryPortAttributes(mDisplay, xv_port, &attrib_count);
- if(attributes!=NULL)
- for (i = 0; i < attrib_count; i++)
+ if(attributes!=NULL){
+ for (i = 0; i < attrib_count; i++){
if (!strcmp(attributes[i].name, "XV_AUTOPAINT_COLORKEY"))
{
xv_atom = XInternAtom(mDisplay, "XV_AUTOPAINT_COLORKEY", False);
@@ -220,7 +220,9 @@ int attrib_count,i;
}
break;
}
+ }
XFree(attributes);
+ }
}
xv_atom = XInternAtom(mDisplay, "XV_COLORKEY",False);