summaryrefslogtreecommitdiff
path: root/libavdevice
diff options
context:
space:
mode:
authorEddie Hao <eddiehao1@gmail.com>2016-01-16 21:41:54 -0800
committerMichael Niedermayer <michael@niedermayer.cc>2016-01-17 12:01:35 +0100
commita6dc1eb8376c59511845e8c2c92c5bd0a7e31b72 (patch)
treebc401c849c438b3bfb9413b00cf441e133c9a2eb /libavdevice
parent757248ea3cd917a7755cb15f817a9b1f15578718 (diff)
remove all uses of the deprecated avpicture_get_size() function
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavdevice')
-rw-r--r--libavdevice/decklink_dec.cpp2
-rw-r--r--libavdevice/lavfi.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/libavdevice/decklink_dec.cpp b/libavdevice/decklink_dec.cpp
index 89f93de453..6c5bc5dbed 100644
--- a/libavdevice/decklink_dec.cpp
+++ b/libavdevice/decklink_dec.cpp
@@ -473,7 +473,7 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx)
st->codec->time_base.den = ctx->bmd_tb_den;
st->codec->time_base.num = ctx->bmd_tb_num;
- st->codec->bit_rate = avpicture_get_size(st->codec->pix_fmt, ctx->bmd_width, ctx->bmd_height) * 1/av_q2d(st->codec->time_base) * 8;
+ st->codec->bit_rate = av_image_get_buffer_size(st->codec->pix_fmt, ctx->bmd_width, ctx->bmd_height, 1) * 1/av_q2d(st->codec->time_base) * 8;
if (cctx->v210) {
st->codec->codec_id = AV_CODEC_ID_V210;
diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c
index 3453b4d3e7..077879edc8 100644
--- a/libavdevice/lavfi.c
+++ b/libavdevice/lavfi.c
@@ -30,6 +30,7 @@
#include "libavutil/bprint.h"
#include "libavutil/channel_layout.h"
#include "libavutil/file.h"
+#include "libavutil/imgutils.h"
#include "libavutil/internal.h"
#include "libavutil/log.h"
#include "libavutil/mem.h"
@@ -430,7 +431,7 @@ static int lavfi_read_packet(AVFormatContext *avctx, AVPacket *pkt)
stream_idx = lavfi->sink_stream_map[min_pts_sink_idx];
if (frame->width /* FIXME best way of testing a video */) {
- size = avpicture_get_size(frame->format, frame->width, frame->height);
+ size = av_image_get_buffer_size(frame->format, frame->width, frame->height, 1);
if ((ret = av_new_packet(pkt, size)) < 0)
return ret;