diff options
author | Anton Khirnov <anton@khirnov.net> | 2023-01-31 12:27:28 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-02-04 13:40:20 +0100 |
commit | bdc76f467f5caaa15b3bd11cbe6c52cc8f2f45b1 (patch) | |
tree | bd2d15177f5ffc9681d609be283826eaa721b041 /libavcodec/libx264.c | |
parent | d02340b9e3e72f401cddbeb3bcc3cb584902b886 (diff) |
lavu/frame: deprecate reordered_opaque
It is only used in libavcodec, where it's been superseded by
AV_CODEC_CAP_COPY_OPAQUE.
Diffstat (limited to 'libavcodec/libx264.c')
-rw-r--r-- | libavcodec/libx264.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 2742fb11a0..f65ac5dacc 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -50,7 +50,9 @@ #define MB_SIZE 16 typedef struct X264Opaque { +#if FF_API_REORDERED_OPAQUE int64_t reordered_opaque; +#endif int64_t wallclock; int64_t duration; @@ -459,7 +461,11 @@ static int setup_frame(AVCodecContext *ctx, const AVFrame *frame, goto fail; } +#if FF_API_REORDERED_OPAQUE +FF_DISABLE_DEPRECATION_WARNINGS opaque->reordered_opaque = frame->reordered_opaque; +FF_ENABLE_DEPRECATION_WARNINGS +#endif opaque->duration = frame->duration; opaque->wallclock = wallclock; if (ctx->export_side_data & AV_CODEC_EXPORT_DATA_PRFT) @@ -612,7 +618,11 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame, out_opaque = pic_out.opaque; if (out_opaque >= x4->reordered_opaque && out_opaque < &x4->reordered_opaque[x4->nb_reordered_opaque]) { +#if FF_API_REORDERED_OPAQUE +FF_DISABLE_DEPRECATION_WARNINGS ctx->reordered_opaque = out_opaque->reordered_opaque; +FF_ENABLE_DEPRECATION_WARNINGS +#endif wallclock = out_opaque->wallclock; pkt->duration = out_opaque->duration; @@ -627,7 +637,11 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame, // Unexpected opaque pointer on picture output av_log(ctx, AV_LOG_ERROR, "Unexpected opaque pointer; " "this is a bug, please report it.\n"); +#if FF_API_REORDERED_OPAQUE +FF_DISABLE_DEPRECATION_WARNINGS ctx->reordered_opaque = 0; +FF_ENABLE_DEPRECATION_WARNINGS +#endif } switch (pic_out.i_type) { |