changeset 7272:643c85503f1f libavcodec

strdup() the default value for rc_eq in AVCodec when setting it in avcodec_get_context_defaults(). The value has to be alloced dinamically rather than statically since it may be freed for example by av_set_string2(). Fix a segmentation fault.
author stefano
date Sun, 13 Jul 2008 21:44:00 +0000
parents 8c58eeb20826
children 3511d8cdd310
files utils.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/utils.c	Sun Jul 13 21:28:17 2008 +0000
+++ b/utils.c	Sun Jul 13 21:44:00 2008 +0000
@@ -741,7 +741,7 @@
         flags= AV_OPT_FLAG_SUBTITLE_PARAM;
     av_opt_set_defaults2(s, flags, flags);
 
-    s->rc_eq= "tex^qComp";
+    s->rc_eq= av_strdup("tex^qComp");
     s->time_base= (AVRational){0,1};
     s->get_buffer= avcodec_default_get_buffer;
     s->release_buffer= avcodec_default_release_buffer;