mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
av: Use av_image_get_buffer_size() instead of deprecated avpicture_get_size()
This commit is contained in:
parent
fce3e0ba66
commit
4e0b05bf7f
2 changed files with 6 additions and 3 deletions
|
@ -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,
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue