@@ -223,7 +223,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
return ret;
if (find_frame_rate_index(mpeg12) < 0) {
- if (s->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) {
+ if (avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) {
av_log(avctx, AV_LOG_ERROR, "MPEG-1/2 does not support %d/%d fps\n",
avctx->time_base.den, avctx->time_base.num);
return AVERROR(EINVAL);
@@ -1068,9 +1068,9 @@ int ff_mpeg4_encode_picture_header(MPVMainEncContext *m, int picture_number)
if (s->pict_type == AV_PICTURE_TYPE_I) {
if (!(s->avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER)) {
- if (s->strict_std_compliance < FF_COMPLIANCE_VERY_STRICT) // HACK, the reference sw is buggy
+ if (s->avctx->strict_std_compliance < FF_COMPLIANCE_VERY_STRICT) // HACK, the reference sw is buggy
mpeg4_encode_visual_object_header(m);
- if (s->strict_std_compliance < FF_COMPLIANCE_VERY_STRICT || picture_number == 0) // HACK, the reference sw is buggy
+ if (s->avctx->strict_std_compliance < FF_COMPLIANCE_VERY_STRICT || picture_number == 0) // HACK, the reference sw is buggy
mpeg4_encode_vol_header(m, 0, 0);
}
if (!(s->workaround_bugs & FF_BUG_MS))
@@ -97,7 +97,6 @@ typedef struct MPVContext {
int encoding; ///< true if we are encoding (vs decoding)
int luma_elim_threshold;
int chroma_elim_threshold;
- int strict_std_compliance; ///< strictly follow the std (MPEG-4, ...)
int workaround_bugs; ///< workaround bugs in encoders which cannot be detected automatically
int codec_tag; ///< internal codec_tag upper case converted from avctx codec_tag
/* the following fields are managed internally by the encoder */
@@ -370,7 +370,6 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx)
return AVERROR(EINVAL);
}
- s->strict_std_compliance = avctx->strict_std_compliance;
s->quarter_sample = (avctx->flags & AV_CODEC_FLAG_QPEL) != 0;
s->rtp_mode = !!s->rtp_payload_size;
s->intra_dc_precision = avctx->intra_dc_precision;
@@ -585,7 +584,7 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx)
if (avctx->flags & AV_CODEC_FLAG_LOW_DELAY) {
if (s->codec_id != AV_CODEC_ID_MPEG2VIDEO &&
- s->strict_std_compliance >= FF_COMPLIANCE_NORMAL) {
+ avctx->strict_std_compliance >= FF_COMPLIANCE_NORMAL) {
av_log(avctx, AV_LOG_ERROR,
"low delay forcing is only available for mpeg2, "
"set strict_std_compliance to 'unofficial' or lower in order to allow it\n");
It just duplicates AVCodecContext.strict_std_compliance. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/mpeg12enc.c | 2 +- libavcodec/mpeg4videoenc.c | 4 ++-- libavcodec/mpegvideo.h | 1 - libavcodec/mpegvideo_enc.c | 3 +-- 4 files changed, 4 insertions(+), 6 deletions(-)