You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/mpegvideo_enc: Call ff_h261_encode_init() earlier
It does not require anything that is being set between the new position where it is called and the old position where it used to be called; and nothing that it sets gets overwritten between these two positions. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -689,6 +689,7 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx)
|
|||||||
s->width, s->height);
|
s->width, s->height);
|
||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
|
ff_h261_encode_init(s);
|
||||||
s->out_format = FMT_H261;
|
s->out_format = FMT_H261;
|
||||||
avctx->delay = 0;
|
avctx->delay = 0;
|
||||||
s->low_delay = 1;
|
s->low_delay = 1;
|
||||||
@@ -899,9 +900,7 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx)
|
|||||||
ff_set_cmp(&s->mecc, s->mecc.ildct_cmp, avctx->ildct_cmp);
|
ff_set_cmp(&s->mecc, s->mecc.ildct_cmp, avctx->ildct_cmp);
|
||||||
ff_set_cmp(&s->mecc, s->mecc.frame_skip_cmp, s->frame_skip_cmp);
|
ff_set_cmp(&s->mecc, s->mecc.frame_skip_cmp, s->frame_skip_cmp);
|
||||||
|
|
||||||
if (CONFIG_H261_ENCODER && s->out_format == FMT_H261) {
|
if ((CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER)
|
||||||
ff_h261_encode_init(s);
|
|
||||||
} else if ((CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER)
|
|
||||||
&& s->out_format == FMT_MPEG1) {
|
&& s->out_format == FMT_MPEG1) {
|
||||||
ff_mpeg1_encode_init(s);
|
ff_mpeg1_encode_init(s);
|
||||||
} else if (CONFIG_H263_ENCODER && s->out_format == FMT_H263) {
|
} else if (CONFIG_H263_ENCODER && s->out_format == FMT_H263) {
|
||||||
|
Reference in New Issue
Block a user