aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/targaenc.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2015-10-14 11:33:24 +0200
committerVittorio Giovara <vittorio.giovara@gmail.com>2015-10-21 11:59:59 +0200
commitf890677d05bc4e8b494a73373ab4cc19791bf884 (patch)
treecb66705498706dc94caa00ae80962f770a7ba056 /libavcodec/targaenc.c
parent13bddab7de10aebf6efb98aa6d7ff0c51bb0e364 (diff)
downloadffmpeg-f890677d05bc4e8b494a73373ab4cc19791bf884.tar.gz
Replace any remaining avpicture function with imgutils
avpicture_get_size() -> av_image_get_buffer_size() Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'libavcodec/targaenc.c')
-rw-r--r--libavcodec/targaenc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/targaenc.c b/libavcodec/targaenc.c
index a85400f958..290054de37 100644
--- a/libavcodec/targaenc.c
+++ b/libavcodec/targaenc.c
@@ -21,6 +21,7 @@
#include <string.h>
+#include "libavutil/imgutils.h"
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/pixdesc.h"
@@ -84,7 +85,8 @@ static int targa_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
av_log(avctx, AV_LOG_ERROR, "image dimensions too large\n");
return AVERROR(EINVAL);
}
- picsize = avpicture_get_size(avctx->pix_fmt, avctx->width, avctx->height);
+ picsize = av_image_get_buffer_size(avctx->pix_fmt,
+ avctx->width, avctx->height, 1);
if ((ret = ff_alloc_packet(pkt, picsize + 45)) < 0) {
av_log(avctx, AV_LOG_ERROR, "encoded frame too large\n");
return ret;