diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2008-07-13 21:44:00 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2008-07-13 21:44:00 +0000 |
commit | 9606a838241035c6168ccd33f6ca0e4f9c6807b1 (patch) | |
tree | 306c82f0bdc45c0c237316092133cb0221d3ac4a | |
parent | bd6754aa796954aa5b95f11acc1a23e3abcfb948 (diff) | |
download | ffmpeg-9606a838241035c6168ccd33f6ca0e4f9c6807b1.tar.gz |
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.
Originally committed as revision 14221 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavcodec/utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 2c31c78282..92f73b735b 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -741,7 +741,7 @@ void avcodec_get_context_defaults2(AVCodecContext *s, enum CodecType codec_type) 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; |