From f890677d05bc4e8b494a73373ab4cc19791bf884 Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Wed, 14 Oct 2015 11:33:24 +0200 Subject: Replace any remaining avpicture function with imgutils avpicture_get_size() -> av_image_get_buffer_size() Signed-off-by: Vittorio Giovara --- libavformat/rawvideodec.c | 3 ++- libavformat/yuv4mpegdec.c | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'libavformat') diff --git a/libavformat/rawvideodec.c b/libavformat/rawvideodec.c index 5f372c9a2c..c7de844765 100644 --- a/libavformat/rawvideodec.c +++ b/libavformat/rawvideodec.c @@ -19,6 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/imgutils.h" #include "libavutil/parseutils.h" #include "libavutil/pixdesc.h" #include "libavutil/opt.h" @@ -85,7 +86,7 @@ static int rawvideo_read_packet(AVFormatContext *s, AVPacket *pkt) width = st->codec->width; height = st->codec->height; - packet_size = avpicture_get_size(st->codec->pix_fmt, width, height); + packet_size = av_image_get_buffer_size(st->codec->pix_fmt, width, height, 1); if (packet_size < 0) return -1; diff --git a/libavformat/yuv4mpegdec.c b/libavformat/yuv4mpegdec.c index dd81358608..0805274144 100644 --- a/libavformat/yuv4mpegdec.c +++ b/libavformat/yuv4mpegdec.c @@ -19,6 +19,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/imgutils.h" + #include "avformat.h" #include "internal.h" #include "yuv4mpeg.h" @@ -226,7 +228,8 @@ static int yuv4_read_packet(AVFormatContext *s, AVPacket *pkt) width = st->codec->width; height = st->codec->height; - packet_size = avpicture_get_size(st->codec->pix_fmt, width, height); + packet_size = av_image_get_buffer_size(st->codec->pix_fmt, + width, height, 1); if (packet_size < 0) return packet_size; -- cgit v1.2.3