aboutsummaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
authorVittorio Giovara2015-09-28 11:40:09 +0200
committerVittorio Giovara2015-09-30 16:44:33 +0200
commit1aa24df74c052a73175c43e57d35b4835e537ec8 (patch)
treecaf5aa58da7ca79188cf37e45315aa78cdbacfe4 /libavutil
parent3f1f6053013d0015e9f115a91a11744807649a07 (diff)
lavu: Deprecate AVFrame.error[]
These field are difficult to interpret, and are provided by a single encoder (mpegvideoenc). In general they do not belong to a structure containing raw data only, so remove them from AVFrame. Mpegvideoenc now uses a private field in Picture for its internal computations. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/frame.c4
-rw-r--r--libavutil/frame.h5
-rw-r--r--libavutil/version.h3
3 files changed, 11 insertions, 1 deletions
diff --git a/libavutil/frame.c b/libavutil/frame.c
index 32ec47066b..e4f6ab3daa 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -400,7 +400,11 @@ int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
dst->color_range = src->color_range;
dst->chroma_location = src->chroma_location;
+#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];
diff --git a/libavutil/frame.h b/libavutil/frame.h
index d231ff3966..c723cb02c3 100644
--- a/libavutil/frame.h
+++ b/libavutil/frame.h
@@ -240,10 +240,13 @@ typedef struct AVFrame {
*/
void *opaque;
+#if FF_API_ERROR_FRAME
/**
- * error
+ * @deprecated unused
*/
+ attribute_deprecated
uint64_t error[AV_NUM_DATA_POINTERS];
+#endif
/**
* When decoding, this signals how much the picture must be delayed.
diff --git a/libavutil/version.h b/libavutil/version.h
index 3c12d7192a..20059c4678 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -96,6 +96,9 @@
#ifndef FF_API_PLUS1_MINUS1
#define FF_API_PLUS1_MINUS1 (LIBAVUTIL_VERSION_MAJOR < 56)
#endif
+#ifndef FF_API_ERROR_FRAME
+#define FF_API_ERROR_FRAME (LIBAVUTIL_VERSION_MAJOR < 56)
+#endif
/**