[FFmpeg-devel] [PATCH 65/87] avutil/frame: Remove deprecated AVFrame.error

James Almer jamrial at gmail.com
Mon Apr 19 17:10:02 EEST 2021


From: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>

Deprecated in 1aa24df74c052a73175c43e57d35b4835e537ec8.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
---
 libavcodec/mpegvideo_enc.c | 7 -------
 libavcodec/snowenc.c       | 6 ------
 libavfilter/vf_swapuv.c    | 6 ------
 libavutil/frame.c          | 6 ------
 libavutil/frame.h          | 8 --------
 libavutil/version.h        | 3 ---
 6 files changed, 36 deletions(-)

diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 0aa94dc7d8..f50f6cdeff 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1604,13 +1604,6 @@ static void frame_end(MpegEncContext *s)
     s->last_lambda_for [s->pict_type] = s->current_picture_ptr->f->quality;
     if (s->pict_type!= AV_PICTURE_TYPE_B)
         s->last_non_b_pict_type = s->pict_type;
-
-#if FF_API_ERROR_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-    memcpy(s->current_picture.f->error, s->current_picture.encoding_error,
-           sizeof(s->current_picture.encoding_error));
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 }
 
 static void update_noise_reduction(MpegEncContext *s)
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c
index 255968341a..e694d51a67 100644
--- a/libavcodec/snowenc.c
+++ b/libavcodec/snowenc.c
@@ -1865,12 +1865,6 @@ redo_frame:
                                    (s->avctx->flags&AV_CODEC_FLAG_PSNR) ? 4 : 0,
                                    s->current_picture->pict_type);
 
-#if FF_API_ERROR_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-    memcpy(s->current_picture->error, s->encoding_error, sizeof(s->encoding_error));
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
     pkt->size = ff_rac_terminate(c, 0);
     if (s->current_picture->key_frame)
         pkt->flags |= AV_PKT_FLAG_KEY;
diff --git a/libavfilter/vf_swapuv.c b/libavfilter/vf_swapuv.c
index 8d62c48c4f..720e699c4a 100644
--- a/libavfilter/vf_swapuv.c
+++ b/libavfilter/vf_swapuv.c
@@ -46,12 +46,6 @@ static void do_swap(AVFrame *frame)
     FFSWAP(uint8_t*,     frame->data[1],     frame->data[2]);
     FFSWAP(int,          frame->linesize[1], frame->linesize[2]);
     FFSWAP(AVBufferRef*, frame->buf[1],      frame->buf[2]);
-
-#if FF_API_ERROR_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-    FFSWAP(uint64_t,     frame->error[1],    frame->error[2]);
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
 }
 
 static AVFrame *get_video_buffer(AVFilterLink *link, int w, int h)
diff --git a/libavutil/frame.c b/libavutil/frame.c
index df826fbfb7..d69dd38dc4 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -316,12 +316,6 @@ FF_ENABLE_DEPRECATION_WARNINGS
 
     av_dict_copy(&dst->metadata, src->metadata, 0);
 
-#if FF_API_ERROR_FRAME
-FF_DISABLE_DEPRECATION_WARNINGS
-    memcpy(dst->error, src->error, sizeof(dst->error));
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
     for (i = 0; i < src->nb_side_data; i++) {
         const AVFrameSideData *sd_src = src->side_data[i];
         AVFrameSideData *sd_dst;
diff --git a/libavutil/frame.h b/libavutil/frame.h
index fbecebbd70..23396189d9 100644
--- a/libavutil/frame.h
+++ b/libavutil/frame.h
@@ -434,14 +434,6 @@ typedef struct AVFrame {
      */
     void *opaque;
 
-#if FF_API_ERROR_FRAME
-    /**
-     * @deprecated unused
-     */
-    attribute_deprecated
-    uint64_t error[AV_NUM_DATA_POINTERS];
-#endif
-
     /**
      * When decoding, this signals how much the picture must be delayed.
      * extra_delay = repeat_pict / (2*fps)
diff --git a/libavutil/version.h b/libavutil/version.h
index 2eb3d3c756..a72788d8e4 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -105,9 +105,6 @@
  * @{
  */
 
-#ifndef FF_API_ERROR_FRAME
-#define FF_API_ERROR_FRAME              (LIBAVUTIL_VERSION_MAJOR < 57)
-#endif
 #ifndef FF_API_PKT_PTS
 #define FF_API_PKT_PTS                  (LIBAVUTIL_VERSION_MAJOR < 57)
 #endif
-- 
2.31.1



More information about the ffmpeg-devel mailing list