aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-04-14 03:36:13 +0200
committerJames Almer <jamrial@gmail.com>2021-04-27 10:43:12 -0300
commit11bc79089378a5ec00547d0f85bc152afdf30dfa (patch)
tree05f5a97cfe141b7a2f5bab4b26205fe014d6ec3e
parent95054bfa48cc71db1c7bf66a6b6628cb62f262bf (diff)
downloadffmpeg-11bc79089378a5ec00547d0f85bc152afdf30dfa.tar.gz
avcodec: Remove deprecated AVCodecContext.coded_frame
Deprecated in 40cf1bbacc6220a0aa6bed5c331871d43f9ce370. (The currently disabled filter vf_mcdeint and vf_uspp were users of this field; they have not been changed, so that whoever wants to fix them can see the state of these filters when they were disabled.) Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Signed-off-by: James Almer <jamrial@gmail.com>
-rw-r--r--libavcodec/aliaspixenc.c7
-rw-r--r--libavcodec/avcodec.c10
-rw-r--r--libavcodec/avcodec.h11
-rw-r--r--libavcodec/bmpenc.c6
-rw-r--r--libavcodec/dnxhdenc.c17
-rw-r--r--libavcodec/dvenc.c6
-rw-r--r--libavcodec/encode.c8
-rw-r--r--libavcodec/ffv1enc.c17
-rw-r--r--libavcodec/flashsvenc.c13
-rw-r--r--libavcodec/huffyuvenc.c7
-rw-r--r--libavcodec/jpeglsenc.c13
-rw-r--r--libavcodec/lclenc.c7
-rw-r--r--libavcodec/libkvazaar.c11
-rw-r--r--libavcodec/libtheoraenc.c5
-rw-r--r--libavcodec/libvpxenc.c24
-rw-r--r--libavcodec/libx264.c11
-rw-r--r--libavcodec/libx265.c6
-rw-r--r--libavcodec/libxavs.c21
-rw-r--r--libavcodec/libxvid.c18
-rw-r--r--libavcodec/ljpegenc.c7
-rw-r--r--libavcodec/mpegvideo_enc.c6
-rw-r--r--libavcodec/nvenc.c6
-rw-r--r--libavcodec/pamenc.c13
-rw-r--r--libavcodec/pcxenc.c13
-rw-r--r--libavcodec/pngenc.c7
-rw-r--r--libavcodec/pnmenc.c17
-rw-r--r--libavcodec/proresenc_kostya.c6
-rw-r--r--libavcodec/pthread_frame.c5
-rw-r--r--libavcodec/qsvenc.c6
-rw-r--r--libavcodec/qtrleenc.c7
-rw-r--r--libavcodec/rawenc.c5
-rw-r--r--libavcodec/sgienc.c7
-rw-r--r--libavcodec/snowenc.c19
-rw-r--r--libavcodec/svq1enc.c7
-rw-r--r--libavcodec/targaenc.c7
-rw-r--r--libavcodec/tiffenc.c6
-rw-r--r--libavcodec/utvideoenc.c9
-rw-r--r--libavcodec/v210enc.c6
-rw-r--r--libavcodec/v410enc.c7
-rw-r--r--libavcodec/version.h3
-rw-r--r--libavcodec/zmbvenc.c6
-rw-r--r--libavdevice/v4l2.c15
42 files changed, 1 insertions, 407 deletions
diff --git a/libavcodec/aliaspixenc.c b/libavcodec/aliaspixenc.c
index a9ba00cd29..7c881d2e0a 100644
--- a/libavcodec/aliaspixenc.c
+++ b/libavcodec/aliaspixenc.c
@@ -33,13 +33,6 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
int width, height, bits_pixel, i, j, length, ret;
uint8_t *in_buf, *buf;
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
- avctx->coded_frame->key_frame = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
width = avctx->width;
height = avctx->height;
diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c
index 01fe8a6d97..322dc9ea66 100644
--- a/libavcodec/avcodec.c
+++ b/libavcodec/avcodec.c
@@ -400,11 +400,6 @@ free_and_end:
av_opt_free(avctx);
if (av_codec_is_encoder(avctx->codec)) {
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- av_frame_free(&avctx->coded_frame);
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
av_freep(&avctx->extradata);
avctx->extradata_size = 0;
}
@@ -578,11 +573,6 @@ av_cold int avcodec_close(AVCodecContext *avctx)
av_freep(&avctx->priv_data);
if (av_codec_is_encoder(avctx->codec)) {
av_freep(&avctx->extradata);
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- av_frame_free(&avctx->coded_frame);
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
} else if (av_codec_is_decoder(avctx->codec))
av_freep(&avctx->subtitle_header);
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 684602f22f..423de52dee 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -1578,17 +1578,6 @@ typedef struct AVCodecContext {
*/
int lowres;
-#if FF_API_CODED_FRAME
- /**
- * the picture in the bitstream
- * - encoding: Set by libavcodec.
- * - decoding: unused
- *
- * @deprecated use the quality factor packet side data instead
- */
- attribute_deprecated AVFrame *coded_frame;
-#endif
-
/**
* thread count
* is used to decide how many independent tasks should be passed to execute()
diff --git a/libavcodec/bmpenc.c b/libavcodec/bmpenc.c
index e829d68475..bab2558bc9 100644
--- a/libavcodec/bmpenc.c
+++ b/libavcodec/bmpenc.c
@@ -74,12 +74,6 @@ static int bmp_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
int bit_count = avctx->bits_per_coded_sample;
uint8_t *ptr, *buf;
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
- avctx->coded_frame->key_frame = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
switch (avctx->pix_fmt) {
case AV_PIX_FMT_RGB444:
compression = BMP_BITFIELDS;
diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c
index 2461c51727..19e11b4214 100644
--- a/libavcodec/dnxhdenc.c
+++ b/libavcodec/dnxhdenc.c
@@ -499,12 +499,6 @@ static av_cold int dnxhd_encode_init(AVCodecContext *avctx)
!FF_ALLOCZ_TYPED_ARRAY(ctx->mb_bits, ctx->m.mb_num) ||
!FF_ALLOCZ_TYPED_ARRAY(ctx->mb_qscale, ctx->m.mb_num))
return AVERROR(ENOMEM);
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->key_frame = 1;
- avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
if (avctx->active_thread_type == FF_THREAD_SLICE) {
if (avctx->thread_count > MAX_THREADS) {
@@ -1252,11 +1246,6 @@ static void dnxhd_load_picture(DNXHDEncContext *ctx, const AVFrame *frame)
ctx->thread[i]->dct_uv_offset = ctx->m.uvlinesize*8;
}
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- ctx->m.avctx->coded_frame->interlaced_frame = frame->interlaced_frame;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
ctx->cur_field = frame->interlaced_frame && !frame->top_field_first;
}
@@ -1317,12 +1306,6 @@ encode_coding_unit:
goto encode_coding_unit;
}
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->quality = ctx->qscale * FF_QP2LAMBDA;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
ff_side_data_set_encoder_stats(pkt, ctx->qscale * FF_QP2LAMBDA, NULL, 0, AV_PICTURE_TYPE_I);
pkt->flags |= AV_PKT_FLAG_KEY;
diff --git a/libavcodec/dvenc.c b/libavcodec/dvenc.c
index e0679c538c..f1be3e43f6 100644
--- a/libavcodec/dvenc.c
+++ b/libavcodec/dvenc.c
@@ -1169,12 +1169,6 @@ static int dvvideo_encode_frame(AVCodecContext *c, AVPacket *pkt,
c->pix_fmt = s->sys->pix_fmt;
s->frame = frame;
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- c->coded_frame->key_frame = 1;
- c->coded_frame->pict_type = AV_PICTURE_TYPE_I;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
s->buf = pkt->data;
dv_format_frame(s, pkt->data);
diff --git a/libavcodec/encode.c b/libavcodec/encode.c
index 75129c8646..c1a60cd2bf 100644
--- a/libavcodec/encode.c
+++ b/libavcodec/encode.c
@@ -527,14 +527,6 @@ int attribute_align_arg avcodec_encode_video2(AVCodecContext *avctx,
int ff_encode_preinit(AVCodecContext *avctx)
{
int i;
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame = av_frame_alloc();
- if (!avctx->coded_frame) {
- return AVERROR(ENOMEM);
- }
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
if (avctx->time_base.num <= 0 || avctx->time_base.den <= 0) {
av_log(avctx, AV_LOG_ERROR, "The encoder timebase is not set.\n");
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index b610d5d65e..749f6265f3 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -745,12 +745,6 @@ static av_cold int encode_init(AVCodecContext *avctx)
if ((ret = ff_ffv1_allocate_initial_states(s)) < 0)
return ret;
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
if (!s->transparency)
s->plane_count = 2;
if (!s->chroma_planes && s->version > 3)
@@ -1174,11 +1168,6 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
av_frame_unref(p);
if ((ret = av_frame_ref(p, pict)) < 0)
return ret;
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
if (avctx->gop_size == 0 || f->picture_number % avctx->gop_size == 0) {
put_rac(c, &keystate, 1);
@@ -1244,12 +1233,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
if (avctx->flags & AV_CODEC_FLAG_PASS1)
avctx->stats_out[0] = '\0';
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->key_frame = f->key_frame;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
f->picture_number++;
pkt->size = buf_p - pkt->data;
pkt->pts =
diff --git a/libavcodec/flashsvenc.c b/libavcodec/flashsvenc.c
index 95ae988448..d365ff3999 100644
--- a/libavcodec/flashsvenc.c
+++ b/libavcodec/flashsvenc.c
@@ -245,21 +245,8 @@ static int flashsv_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
//mark the frame type so the muxer can mux it correctly
if (I_frame) {
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
- avctx->coded_frame->key_frame = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
s->last_key_frame = avctx->frame_number;
ff_dlog(avctx, "Inserting keyframe at frame %d\n", avctx->frame_number);
- } else {
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->pict_type = AV_PICTURE_TYPE_P;
- avctx->coded_frame->key_frame = 0;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
}
if (I_frame)
diff --git a/libavcodec/huffyuvenc.c b/libavcodec/huffyuvenc.c
index 218e57600d..f1b42c8499 100644
--- a/libavcodec/huffyuvenc.c
+++ b/libavcodec/huffyuvenc.c
@@ -222,13 +222,6 @@ static av_cold int encode_init(AVCodecContext *avctx)
if (!avctx->extradata)
return AVERROR(ENOMEM);
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
- avctx->coded_frame->key_frame = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
s->bps = desc->comp[0].depth;
s->yuv = !(desc->flags & AV_PIX_FMT_FLAG_RGB) && desc->nb_components >= 2;
s->chroma = desc->nb_components > 2;
diff --git a/libavcodec/jpeglsenc.c b/libavcodec/jpeglsenc.c
index 0f109c1304..bc64288c95 100644
--- a/libavcodec/jpeglsenc.c
+++ b/libavcodec/jpeglsenc.c
@@ -413,18 +413,6 @@ static int encode_picture_ls(AVCodecContext *avctx, AVPacket *pkt,
return 0;
}
-static av_cold int encode_init_ls(AVCodecContext *ctx)
-{
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- ctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
- ctx->coded_frame->key_frame = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
- return 0;
-}
-
#define OFFSET(x) offsetof(JPEGLSContext, x)
#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
static const AVOption options[] = {
@@ -450,7 +438,6 @@ AVCodec ff_jpegls_encoder = {
.id = AV_CODEC_ID_JPEGLS,
.priv_data_size = sizeof(JPEGLSContext),
.priv_class = &jpegls_class,
- .init = encode_init_ls,
.capabilities = AV_CODEC_CAP_FRAME_THREADS,
.encode2 = encode_picture_ls,
.pix_fmts = (const enum AVPixelFormat[]) {
diff --git a/libavcodec/lclenc.c b/libavcodec/lclenc.c
index 4fe52b40da..250cb5625c 100644
--- a/libavcodec/lclenc.c
+++ b/libavcodec/lclenc.c
@@ -121,13 +121,6 @@ static av_cold int encode_init(AVCodecContext *avctx)
if (!avctx->extradata)
return AVERROR(ENOMEM);
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
- avctx->coded_frame->key_frame = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
c->compression = avctx->compression_level == FF_COMPRESSION_DEFAULT ?
COMP_ZLIB_NORMAL :
av_clip(avctx->compression_level, 0, 9);
diff --git a/libavcodec/libkvazaar.c b/libavcodec/libkvazaar.c
index 4432649853..7dca605059 100644
--- a/libavcodec/libkvazaar.c
+++ b/libavcodec/libkvazaar.c
@@ -276,20 +276,9 @@ static int libkvazaar_encode(AVCodecContext *avctx,
av_log(avctx, AV_LOG_ERROR, "Unknown picture type encountered.\n");
return AVERROR_EXTERNAL;
}
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->pict_type = pict_type;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
ff_side_data_set_encoder_stats(avpkt, frame_info.qp * FF_QP2LAMBDA, NULL, 0, pict_type);
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->quality = frame_info.qp * FF_QP2LAMBDA;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
*got_packet_ptr = 1;
}
diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c
index 16966ed433..a067fa3344 100644
--- a/libavcodec/libtheoraenc.c
+++ b/libavcodec/libtheoraenc.c
@@ -346,11 +346,6 @@ static int encode_frame(AVCodecContext* avc_context, AVPacket *pkt,
// HACK: assumes no encoder delay, this is true until libtheora becomes
// multithreaded (which will be disabled unless explicitly requested)
pkt->pts = pkt->dts = frame->pts;
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avc_context->coded_frame->key_frame = !(o_packet.granulepos & h->keyframe_mask);
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
if (!(o_packet.granulepos & h->keyframe_mask))
pkt->flags |= AV_PKT_FLAG_KEY;
*got_packet = 1;
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index 76013a74d3..bcfbbf3e76 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -1179,28 +1179,12 @@ static int storeframe(AVCodecContext *avctx, struct FrameListData *cx_frame,
int pict_type;
memcpy(pkt->data, cx_frame->buf, pkt->size);
pkt->pts = pkt->dts = cx_frame->pts;
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->pts = cx_frame->pts;
- avctx->coded_frame->key_frame = !!(cx_frame->flags & VPX_FRAME_IS_KEY);
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
if (!!(cx_frame->flags & VPX_FRAME_IS_KEY)) {
pict_type = AV_PICTURE_TYPE_I;
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->pict_type = pict_type;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
pkt->flags |= AV_PKT_FLAG_KEY;
} else {
pict_type = AV_PICTURE_TYPE_P;
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->pict_type = pict_type;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
}
ff_side_data_set_encoder_stats(pkt, 0, cx_frame->sse + 1,
@@ -1209,14 +1193,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
if (cx_frame->have_sse) {
int i;
/* Beware of the Y/U/V/all order! */
-#if FF_API_CODED_FRAME && FF_API_ERROR_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->error[0] = cx_frame->sse[1];
- avctx->coded_frame->error[1] = cx_frame->sse[2];
- avctx->coded_frame->error[2] = cx_frame->sse[3];
- avctx->coded_frame->error[3] = 0; // alpha
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
for (i = 0; i < 3; ++i) {
avctx->error[i] += cx_frame->sse[i + 1];
}
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 4e7097e569..23f7ad897b 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -481,23 +481,12 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame,
av_log(ctx, AV_LOG_ERROR, "Unknown picture type encountered.\n");
return AVERROR_EXTERNAL;
}
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- ctx->coded_frame->pict_type = pict_type;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
pkt->flags |= AV_PKT_FLAG_KEY*pic_out.b_keyframe;
if (ret) {
ff_side_data_set_encoder_stats(pkt, (pic_out.i_qpplus1 - 1) * FF_QP2LAMBDA, NULL, 0, pict_type);
if (wallclock)
ff_side_data_set_prft(pkt, wallclock);
-
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- ctx->coded_frame->quality = (pic_out.i_qpplus1 - 1) * FF_QP2LAMBDA;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
}
*got_packet = ret;
diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
index b2008e96f1..a1bd205201 100644
--- a/libavcodec/libx265.c
+++ b/libavcodec/libx265.c
@@ -566,12 +566,6 @@ static int libx265_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
return AVERROR_EXTERNAL;
}
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->pict_type = pict_type;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
#if X265_BUILD >= 130
if (x265pic_out.sliceType == X265_TYPE_B)
#else
diff --git a/libavcodec/libxavs.c b/libavcodec/libxavs.c
index 0f22016731..b0b6b247b6 100644
--- a/libavcodec/libxavs.c
+++ b/libavcodec/libxavs.c
@@ -165,11 +165,6 @@ static int XAVS_frame(AVCodecContext *avctx, AVPacket *pkt,
return 0;
}
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->pts = pic_out.i_pts;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
pkt->pts = pic_out.i_pts;
if (avctx->has_b_frames) {
if (!x4->out_frame_count)
@@ -194,29 +189,13 @@ FF_ENABLE_DEPRECATION_WARNINGS
default:
pict_type = AV_PICTURE_TYPE_NONE;
}
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->pict_type = pict_type;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
/* There is no IDR frame in AVS JiZhun */
/* Sequence header is used as a flag */
if (pic_out.i_type == XAVS_TYPE_I) {
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->key_frame = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
pkt->flags |= AV_PKT_FLAG_KEY;
}
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->quality = (pic_out.i_qpplus1 - 1) * FF_QP2LAMBDA;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
ff_side_data_set_encoder_stats(pkt, (pic_out.i_qpplus1 - 1) * FF_QP2LAMBDA, NULL, 0, pict_type);
x4->out_frame_count++;
diff --git a/libavcodec/libxvid.c b/libavcodec/libxvid.c
index 22582680a0..2bc32bddb1 100644
--- a/libavcodec/libxvid.c
+++ b/libavcodec/libxvid.c
@@ -828,31 +828,13 @@ static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
else
pict_type = AV_PICTURE_TYPE_I;
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->pict_type = pict_type;
- avctx->coded_frame->quality = xvid_enc_stats.quant * FF_QP2LAMBDA;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
ff_side_data_set_encoder_stats(pkt, xvid_enc_stats.quant * FF_QP2LAMBDA, NULL, 0, pict_type);
if (xvid_enc_frame.out_flags & XVID_KEYFRAME) {
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->key_frame = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
pkt->flags |= AV_PKT_FLAG_KEY;
if (x->quicktime_format)
return xvid_strip_vol_header(avctx, pkt,
xvid_enc_stats.hlength, xerr);
- } else {
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->key_frame = 0;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
}
pkt->size = xerr;
diff --git a/libavcodec/ljpegenc.c b/libavcodec/ljpegenc.c
index 9a107e85ce..788fd4260b 100644
--- a/libavcodec/ljpegenc.c
+++ b/libavcodec/ljpegenc.c
@@ -281,13 +281,6 @@ static av_cold int ljpeg_encode_init(AVCodecContext *avctx)
if (ret < 0)
return ret;
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
- avctx->coded_frame->key_frame = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
s->scratch = av_malloc_array(avctx->width + 1, sizeof(*s->scratch));
if (!s->scratch)
return AVERROR(ENOMEM);
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 34cad92895..53297cb788 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1605,12 +1605,6 @@ static void frame_end(MpegEncContext *s)
if (s->pict_type!= AV_PICTURE_TYPE_B)
s->last_non_b_pict_type = s->pict_type;
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- av_frame_unref(s->avctx->coded_frame);
- av_frame_copy_props(s->avctx->coded_frame, s->current_picture.f);
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
#if FF_API_ERROR_FRAME
FF_DISABLE_DEPRECATION_WARNINGS
memcpy(s->current_picture.f->error, s->current_picture.encoding_error,
diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index d33ee489d0..0dcd93a99c 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -2041,12 +2041,6 @@ static int process_output_surface(AVCodecContext *avctx, AVPacket *pkt, NvencSur
goto error;
}
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->pict_type = pict_type;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
ff_side_data_set_encoder_stats(pkt,
(lock_params.frameAvgQP - 1) * FF_QP2LAMBDA, NULL, 0, pict_type);
diff --git a/libavcodec/pamenc.c b/libavcodec/pamenc.c
index 50c9fcb404..ef3bc3bf16 100644
--- a/libavcodec/pamenc.c
+++ b/libavcodec/pamenc.c
@@ -127,24 +127,11 @@ static int pam_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
return 0;
}
-static av_cold int pam_encode_init(AVCodecContext *avctx)
-{
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
- avctx->coded_frame->key_frame = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
- return 0;
-}
-
AVCodec ff_pam_encoder = {
.name = "pam",
.long_name = NULL_IF_CONFIG_SMALL("PAM (Portable AnyMap) image"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_PAM,
- .init = pam_encode_init,
.encode2 = pam_encode_frame,
.pix_fmts = (const enum AVPixelFormat[]){
AV_PIX_FMT_RGB24, AV_PIX_FMT_RGBA,
diff --git a/libavcodec/pcxenc.c b/libavcodec/pcxenc.c
index 6135944c31..709bf84d12 100644
--- a/libavcodec/pcxenc.c
+++ b/libavcodec/pcxenc.c
@@ -33,18 +33,6 @@
static const uint32_t monoblack_pal[16] = { 0x000000, 0xFFFFFF };
-static av_cold int pcx_encode_init(AVCodecContext *avctx)
-{
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
- avctx->coded_frame->key_frame = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
- return 0;
-}
-
/**
* PCX run-length encoder
* @param dst output buffer
@@ -209,7 +197,6 @@ AVCodec ff_pcx_encoder = {
.long_name = NULL_IF_CONFIG_SMALL("PC Paintbrush PCX image"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_PCX,
- .init = pcx_encode_init,
.encode2 = pcx_encode_frame,
.pix_fmts = (const enum AVPixelFormat[]){
AV_PIX_FMT_RGB24,
diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c
index e2636b7daf..374d7c9cf7 100644
--- a/libavcodec/pngenc.c
+++ b/libavcodec/pngenc.c
@@ -1008,13 +1008,6 @@ static av_cold int png_enc_init(AVCodecContext *avctx)
avctx->bits_per_coded_sample = 8;
}
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
- avctx->coded_frame->key_frame = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
ff_llvidencdsp_init(&s->llvidencdsp);
if (avctx->pix_fmt == AV_PIX_FMT_MONOBLACK)
diff --git a/libavcodec/pnmenc.c b/libavcodec/pnmenc.c
index 276504bf14..56e929a5f0 100644
--- a/libavcodec/pnmenc.c
+++ b/libavcodec/pnmenc.c
@@ -148,25 +148,12 @@ static int pnm_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
return 0;
}
-static av_cold int pnm_encode_init(AVCodecContext *avctx)
-{
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
- avctx->coded_frame->key_frame = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
- return 0;
-}
-
#if CONFIG_PGM_ENCODER
AVCodec ff_pgm_encoder = {
.name = "pgm",
.long_name = NULL_IF_CONFIG_SMALL("PGM (Portable GrayMap) image"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_PGM,
- .init = pnm_encode_init,
.encode2 = pnm_encode_frame,
.pix_fmts = (const enum AVPixelFormat[]){
AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY16BE, AV_PIX_FMT_NONE
@@ -181,7 +168,6 @@ AVCodec ff_pgmyuv_encoder = {
.long_name = NULL_IF_CONFIG_SMALL("PGMYUV (Portable GrayMap YUV) image"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_PGMYUV,
- .init = pnm_encode_init,
.encode2 = pnm_encode_frame,
.pix_fmts = (const enum AVPixelFormat[]){
AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV420P16BE, AV_PIX_FMT_NONE
@@ -196,7 +182,6 @@ AVCodec ff_ppm_encoder = {
.long_name = NULL_IF_CONFIG_SMALL("PPM (Portable PixelMap) image"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_PPM,
- .init = pnm_encode_init,
.encode2 = pnm_encode_frame,
.pix_fmts = (const enum AVPixelFormat[]){
AV_PIX_FMT_RGB24, AV_PIX_FMT_RGB48BE, AV_PIX_FMT_NONE
@@ -211,7 +196,6 @@ AVCodec ff_pbm_encoder = {
.long_name = NULL_IF_CONFIG_SMALL("PBM (Portable BitMap) image"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_PBM,
- .init = pnm_encode_init,
.encode2 = pnm_encode_frame,
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_MONOWHITE,
AV_PIX_FMT_NONE },
@@ -225,7 +209,6 @@ AVCodec ff_pfm_encoder = {
.long_name = NULL_IF_CONFIG_SMALL("PFM (Portable FloatMap) image"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_PFM,
- .init = pnm_encode_init,
.encode2 = pnm_encode_frame,
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_GBRPF32,
AV_PIX_FMT_NONE },
diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c
index 54fc6707a1..81a8cd73e7 100644
--- a/libavcodec/proresenc_kostya.c
+++ b/libavcodec/proresenc_kostya.c
@@ -1179,12 +1179,6 @@ static av_cold int encode_init(AVCodecContext *avctx)
int interlaced = !!(avctx->flags & AV_CODEC_FLAG_INTERLACED_DCT);
avctx->bits_per_raw_sample = 10;
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
- avctx->coded_frame->key_frame = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
ctx->fdct = prores_fdct;
ctx->scantable = interlaced ? ff_prores_interlaced_scan
diff --git a/libavcodec/pthread_frame.c b/libavcodec/pthread_frame.c
index ae5b000d97..78116e7e5a 100644
--- a/libavcodec/pthread_frame.c
+++ b/libavcodec/pthread_frame.c
@@ -321,11 +321,6 @@ static int update_context_from_thread(AVCodecContext *dst, AVCodecContext *src,
}
if (for_user) {
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- dst->coded_frame = src->coded_frame;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
if (dst->codec->update_thread_context_for_user)
err = dst->codec->update_thread_context_for_user(dst, src);
} else {
diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 6281e63a54..0ec8e0e597 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -1555,12 +1555,6 @@ int ff_qsv_encode(AVCodecContext *avctx, QSVEncContext *q,
return AVERROR_INVALIDDATA;
}
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->pict_type = pict_type;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
#if QSV_VERSION_ATLEAST(1, 26)
if (avctx->codec_id == AV_CODEC_ID_H264) {
enc_buf = bs->ExtParam;
diff --git a/libavcodec/qtrleenc.c b/libavcodec/qtrleenc.c
index f7eee4a591..9340563084 100644
--- a/libavcodec/qtrleenc.c
+++ b/libavcodec/qtrleenc.c
@@ -391,13 +391,6 @@ static int qtrle_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
return ret;
}
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->key_frame = s->key_frame;
- avctx->coded_frame->pict_type = s->key_frame ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
if (s->key_frame)
pkt->flags |= AV_PKT_FLAG_KEY;
*got_packet = 1;
diff --git a/libavcodec/rawenc.c b/libavcodec/rawenc.c
index d181b74570..a7dd162d55 100644
--- a/libavcodec/rawenc.c
+++ b/libavcodec/rawenc.c
@@ -36,11 +36,6 @@ static av_cold int raw_encode_init(AVCodecContext *avctx)
{
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt);
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
avctx->bits_per_coded_sample = av_get_bits_per_pixel(desc);
if(!avctx->codec_tag)
avctx->codec_tag = avcodec_pix_fmt_to_codec_tag(avctx->pix_fmt);
diff --git a/libavcodec/sgienc.c b/libavcodec/sgienc.c
index 2a898f5a4f..d31f6340f7 100644
--- a/libavcodec/sgienc.c
+++ b/libavcodec/sgienc.c
@@ -100,13 +100,6 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
unsigned int width, height, depth, dimension;
unsigned int bytes_per_channel, pixmax, put_be;
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
- avctx->coded_frame->key_frame = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
width = avctx->width;
height = avctx->height;
bytes_per_channel = 1;
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c
index fc0e5230a9..255968341a 100644
--- a/libavcodec/snowenc.c
+++ b/libavcodec/snowenc.c
@@ -1618,22 +1618,10 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
s->lambda = 0;
}//else keep previous frame's qlog until after motion estimation
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- av_frame_unref(avctx->coded_frame);
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
if (s->current_picture->data[0]) {
int w = s->avctx->width;
int h = s->avctx->height;
-#if FF_API_CODED_FRAME
- ret = av_frame_make_writable(s->current_picture);
- if (ret < 0)
- return ret;
-#endif
-
s->mpvencdsp.draw_edges(s->current_picture->data[0],
s->current_picture->linesize[0], w , h ,
EDGE_WIDTH , EDGE_WIDTH , EDGE_TOP | EDGE_BOTTOM);
@@ -1649,13 +1637,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
}
ff_snow_frame_start(s);
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- ret = av_frame_ref(avctx->coded_frame, s->current_picture);
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
- if (ret < 0)
- return ret;
s->m.current_picture_ptr= &s->m.current_picture;
s->m.current_picture.f = s->current_picture;
diff --git a/libavcodec/svq1enc.c b/libavcodec/svq1enc.c
index b2a4d25d70..38c1ede40a 100644
--- a/libavcodec/svq1enc.c
+++ b/libavcodec/svq1enc.c
@@ -615,13 +615,6 @@ static int svq1_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
s->pict_type = AV_PICTURE_TYPE_I;
s->quality = pict->quality;
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->pict_type = s->pict_type;
- avctx->coded_frame->key_frame = s->pict_type == AV_PICTURE_TYPE_I;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
ff_side_data_set_encoder_stats(pkt, pict->quality, NULL, 0, s->pict_type);
svq1_write_header(s, s->pict_type);
diff --git a/libavcodec/targaenc.c b/libavcodec/targaenc.c
index f662e4a489..cd6cc9e874 100644
--- a/libavcodec/targaenc.c
+++ b/libavcodec/targaenc.c
@@ -184,13 +184,6 @@ static av_cold int targa_encode_init(AVCodecContext *avctx)
return AVERROR(EINVAL);
}
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->key_frame = 1;
- avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
return 0;
}
diff --git a/libavcodec/tiffenc.c b/libavcodec/tiffenc.c
index 6661e59d31..03262f97b2 100644
--- a/libavcodec/tiffenc.c
+++ b/libavcodec/tiffenc.c
@@ -533,12 +533,6 @@ static av_cold int encode_init(AVCodecContext *avctx)
}
#endif
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
- avctx->coded_frame->key_frame = 1;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
s->avctx = avctx;
return 0;
diff --git a/libavcodec/utvideoenc.c b/libavcodec/utvideoenc.c
index 8c8a9535a1..670e48aa9f 100644
--- a/libavcodec/utvideoenc.c
+++ b/libavcodec/utvideoenc.c
@@ -621,15 +621,8 @@ static int utvideo_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
* At least currently Ut Video is IDR only.
* Set flags accordingly.
*/
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->key_frame = 1;
- avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
- pkt->size = bytestream2_tell_p(&pb);
pkt->flags |= AV_PKT_FLAG_KEY;
+ pkt->size = bytestream2_tell_p(&pb);
/* Packet should be done */
*got_packet = 1;
diff --git a/libavcodec/v210enc.c b/libavcodec/v210enc.c
index 16e8810271..91af88b359 100644
--- a/libavcodec/v210enc.c
+++ b/libavcodec/v210enc.c
@@ -101,12 +101,6 @@ static av_cold int encode_init(AVCodecContext *avctx)
return AVERROR(EINVAL);
}
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
ff_v210enc_init(s);
avctx->bits_per_coded_sample = 20;
diff --git a/libavcodec/v410enc.c b/libavcodec/v410enc.c
index 5e2450279f..9dc13f7144 100644
--- a/libavcodec/v410enc.c
+++ b/libavcodec/v410enc.c
@@ -51,13 +51,6 @@ static int v410_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
return ret;
dst = pkt->data;
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->key_frame = 1;
- avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
y = (uint16_t *)pic->data[0];
u = (uint16_t *)pic->data[1];
v = (uint16_t *)pic->data[2];
diff --git a/libavcodec/version.h b/libavcodec/version.h
index d2a635cd89..07e2eec800 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -51,9 +51,6 @@
* at once through the bump. This improves the git bisect-ability of the change.
*/
-#ifndef FF_API_CODED_FRAME
-#define FF_API_CODED_FRAME (LIBAVCODEC_VERSION_MAJOR < 59)
-#endif
#ifndef FF_API_OPENH264_SLICE_MODE
#define FF_API_OPENH264_SLICE_MODE (LIBAVCODEC_VERSION_MAJOR < 59)
#endif
diff --git a/libavcodec/zmbvenc.c b/libavcodec/zmbvenc.c
index 319381dd48..1d4c617b4a 100644
--- a/libavcodec/zmbvenc.c
+++ b/libavcodec/zmbvenc.c
@@ -180,12 +180,6 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
c->curfrm++;
if(c->curfrm == c->keyint)
c->curfrm = 0;
-#if FF_API_CODED_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->coded_frame->pict_type = keyframe ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P;
- avctx->coded_frame->key_frame = keyframe;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
palptr = (avctx->pix_fmt == AV_PIX_FMT_PAL8) ? (uint32_t *)p->data[1] : NULL;
chpal = !keyframe && palptr && memcmp(palptr, c->pal2, 1024);
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 365bacd771..a5226d5e6f 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -981,27 +981,12 @@ fail:
static int v4l2_read_packet(AVFormatContext *ctx, AVPacket *pkt)
{
-#if FF_API_CODED_FRAME && FF_API_LAVF_AVCTX
-FF_DISABLE_DEPRECATION_WARNINGS
- struct video_data *s = ctx->priv_data;
- AVFrame *frame = ctx->streams[0]->codec->coded_frame;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
int res;
if ((res = mmap_read_frame(ctx, pkt)) < 0) {
return res;
}
-#if FF_API_CODED_FRAME && FF_API_LAVF_AVCTX
-FF_DISABLE_DEPRECATION_WARNINGS
- if (frame && s->interlaced) {
- frame->interlaced_frame = 1;
- frame->top_field_first = s->top_field_first;
- }
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
return pkt->size;
}