summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2008-07-13 21:28:17 +0000
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2008-07-13 21:28:17 +0000
commitf96905899866738460d52241ddec729aa1ddeca1 (patch)
tree15e73daec33e4a8fbfd7bedd903ca041b4a0ab16
parentb903a9285e82d56ffeee290dae70843e55e88a40 (diff)
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
-rw-r--r--libavcodec/opt.c2
1 files changed, 1 insertions, 1 deletions
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);
}