av: Use av_image_get_buffer_size() instead of deprecated avpicture_get_size()

This commit is contained in:
Sebastian Dröge 2016-01-19 09:42:47 +02:00
parent fce3e0ba66
commit 4e0b05bf7f
2 changed files with 6 additions and 3 deletions

View file

@ -25,6 +25,7 @@
#endif
#include <libavcodec/avcodec.h>
#include <libavutil/imgutils.h>
#include <libavfilter/avfilter.h>
#include <libavfilter/buffersrc.h>
#include <libavfilter/buffersink.h>
@ -234,8 +235,8 @@ gst_ffmpegdeinterlace_sink_setcaps (GstPad * pad, GstCaps * caps)
av_free (ctx);
deinterlace->to_size =
avpicture_get_size (deinterlace->pixfmt, deinterlace->width,
deinterlace->height);
av_image_get_buffer_size (deinterlace->pixfmt, deinterlace->width,
deinterlace->height, 1);
src_caps = gst_caps_copy (caps);
gst_caps_set_simple (src_caps, "interlace-mode", G_TYPE_STRING,

View file

@ -276,7 +276,9 @@ gst_ffmpegscale_get_unit_size (GstBaseTransform * trans, GstCaps * caps,
return FALSE;
}
*size = (guint) avpicture_get_size (ctx->pix_fmt, ctx->width, ctx->height);
*size =
(guint) av_image_get_buffer_size (pix->pix_fmt, ctx->width, ctx->height,
1);
av_free (ctx);