diff opt.c @ 7271:8c58eeb20826 libavcodec

Fix the logic to access the location of a string to free when setting a new value for a string with av_set_string2(). Fix a segmentation fault.
author stefano
date Sun, 13 Jul 2008 21:28:17 +0000
parents d5a52b28c9de
children f0bf2db65dc3
line wrap: on
line diff
--- a/opt.c	Sun Jul 13 20:41:09 2008 +0000
+++ b/opt.c	Sun Jul 13 21:28:17 2008 +0000
@@ -196,7 +196,7 @@
     }
 
     if(alloc){
-        av_free((void*)(((uint8_t*)obj) + o->offset));
+        av_free(*(void**)(((uint8_t*)obj) + o->offset));
         val= av_strdup(val);
     }