Browse Source

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
tags/v0.5
Stefano Sabatini 17 years ago
parent
commit
f969058998
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/opt.c

+ 1
- 1
libavcodec/opt.c View File

@@ -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);
}



Loading…
Cancel
Save