From dca23ffbc7568c9af5c5fbaa86e6a0761ecae50c Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Wed, 14 Oct 2015 11:33:28 +0200 Subject: lavc: Deprecate AVPicture structure and related functions This structure served as a bridge between data pointers and frames, but it suffers from several limitations: - it is not refcounted and data must be copied to every time - it cannot be expanded without ABI break due to being used on the stack - its functions are just wrappers to imgutils which add a layer of unneeded indirection, and maintenance burden - it allows hacks like embedding uncompressed data in packets - its use is often confusing to our users AVFrame provides a much better API, and, if a full blown frame is not needed, it is just as simple and more straightfoward to use data and linesize arrays directly. Signed-off-by: Vittorio Giovara --- libavcodec/avpicture.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libavcodec/avpicture.c') diff --git a/libavcodec/avpicture.c b/libavcodec/avpicture.c index 6bde0f8445..eaa5c2614e 100644 --- a/libavcodec/avpicture.c +++ b/libavcodec/avpicture.c @@ -31,6 +31,7 @@ #include "libavutil/imgutils.h" #include "libavutil/colorspace.h" +#if FF_API_AVPICTURE int avpicture_fill(AVPicture *picture, uint8_t *ptr, enum AVPixelFormat pix_fmt, int width, int height) { @@ -76,4 +77,4 @@ void av_picture_copy(AVPicture *dst, const AVPicture *src, av_image_copy(dst->data, dst->linesize, src->data, src->linesize, pix_fmt, width, height); } - +#endif /* FF_API_AVPICTURE */ -- cgit v1.2.3