From f96905899866738460d52241ddec729aa1ddeca1 Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Sun, 13 Jul 2008 21:28:17 +0000 Subject: 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. Originally committed as revision 14219 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/opt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavcodec/opt.c') diff --git a/libavcodec/opt.c b/libavcodec/opt.c index 3e10380222..acf94ba824 100644 --- a/libavcodec/opt.c +++ b/libavcodec/opt.c @@ -196,7 +196,7 @@ const AVOption *av_set_string2(void *obj, const char *name, const char *val, int } if(alloc){ - av_free((void*)(((uint8_t*)obj) + o->offset)); + av_free(*(void**)(((uint8_t*)obj) + o->offset)); val= av_strdup(val); } -- cgit v1.2.3