mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/ratecontrol: Pass RCContext directly in ff_rate_control_uninit()
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
ba28222a14
commit
0c9e04b0e2
|
@ -989,7 +989,7 @@ av_cold int ff_mpv_encode_end(AVCodecContext *avctx)
|
|||
MpegEncContext *s = avctx->priv_data;
|
||||
int i;
|
||||
|
||||
ff_rate_control_uninit(s);
|
||||
ff_rate_control_uninit(&s->rc_context);
|
||||
|
||||
ff_mpv_common_end(s);
|
||||
|
||||
|
|
|
@ -623,7 +623,7 @@ av_cold int ff_rate_control_init(MpegEncContext *s)
|
|||
}
|
||||
|
||||
if (init_pass2(s) < 0) {
|
||||
ff_rate_control_uninit(s);
|
||||
ff_rate_control_uninit(rcc);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
@ -688,9 +688,8 @@ av_cold int ff_rate_control_init(MpegEncContext *s)
|
|||
return 0;
|
||||
}
|
||||
|
||||
av_cold void ff_rate_control_uninit(MpegEncContext *s)
|
||||
av_cold void ff_rate_control_uninit(RateControlContext *rcc)
|
||||
{
|
||||
RateControlContext *rcc = &s->rc_context;
|
||||
emms_c();
|
||||
|
||||
av_expr_free(rcc->rc_eq_eval);
|
||||
|
|
|
@ -87,8 +87,8 @@ struct MpegEncContext;
|
|||
int ff_rate_control_init(struct MpegEncContext *s);
|
||||
float ff_rate_estimate_qscale(struct MpegEncContext *s, int dry_run);
|
||||
void ff_write_pass1_stats(struct MpegEncContext *s);
|
||||
void ff_rate_control_uninit(struct MpegEncContext *s);
|
||||
int ff_vbv_update(struct MpegEncContext *s, int frame_size);
|
||||
void ff_get_2pass_fcode(struct MpegEncContext *s);
|
||||
void ff_rate_control_uninit(RateControlContext *rcc);
|
||||
|
||||
#endif /* AVCODEC_RATECONTROL_H */
|
||||
|
|
|
@ -2077,7 +2077,7 @@ static av_cold int encode_end(AVCodecContext *avctx)
|
|||
SnowContext *const s = &enc->com;
|
||||
|
||||
ff_snow_common_end(s);
|
||||
ff_rate_control_uninit(&enc->m);
|
||||
ff_rate_control_uninit(&enc->m.rc_context);
|
||||
av_frame_free(&s->input_picture);
|
||||
|
||||
for (int i = 0; i < MAX_REF_FRAMES; i++) {
|
||||
|
|
Loading…
Reference in New Issue