mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
Fix rc_eq mem leak.
Originally committed as revision 14788 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
847d05360b
commit
3cffbe090a
@ -106,7 +106,7 @@ int ff_rate_control_init(MpegEncContext *s)
|
||||
};
|
||||
emms_c();
|
||||
|
||||
rcc->rc_eq_eval = ff_parse(s->avctx->rc_eq, const_names, func1, func1_names, NULL, NULL, &error);
|
||||
rcc->rc_eq_eval = ff_parse(s->avctx->rc_eq ? s->avctx->rc_eq : "tex^qComp", const_names, func1, func1_names, NULL, NULL, &error);
|
||||
if (!rcc->rc_eq_eval) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "Error parsing rc_eq \"%s\": %s\n", s->avctx->rc_eq, error? error : "");
|
||||
return -1;
|
||||
|
@ -762,7 +762,6 @@ 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= av_strdup("tex^qComp");
|
||||
s->time_base= (AVRational){0,1};
|
||||
s->get_buffer= avcodec_default_get_buffer;
|
||||
s->release_buffer= avcodec_default_release_buffer;
|
||||
|
@ -132,7 +132,7 @@ static int ffm_write_header(AVFormatContext *s)
|
||||
put_be16(pb, (int) (codec->qcompress * 10000.0));
|
||||
put_be16(pb, (int) (codec->qblur * 10000.0));
|
||||
put_be32(pb, codec->bit_rate_tolerance);
|
||||
put_strz(pb, codec->rc_eq);
|
||||
put_strz(pb, codec->rc_eq ? codec->rc_eq : "tex^qComp");
|
||||
put_be32(pb, codec->rc_max_rate);
|
||||
put_be32(pb, codec->rc_min_rate);
|
||||
put_be32(pb, codec->rc_buffer_size);
|
||||
|
Loading…
Reference in New Issue
Block a user