summaryrefslogtreecommitdiff
path: root/ext/libav/gstavdemux.c
diff options
context:
space:
mode:
authorMathieu Duponchelle <mathieu@centricular.com>2018-06-29 04:52:02 +0200
committerMathieu Duponchelle <mathieu@centricular.com>2018-07-13 00:53:26 +0200
commit4f28ea23eb57e8df5cdf86055566602c75dc2bf2 (patch)
tree448cd4aa61fbe182a50525abd628b95cf7c827c8 /ext/libav/gstavdemux.c
parent9cc57a74d80d389530ef6373474957e9fa61c1fa (diff)
downloadgst-libav-4f28ea23eb57e8df5cdf86055566602c75dc2bf2.tar.gz
Remove all uses of AVPicture
https://bugzilla.gnome.org/show_bug.cgi?id=792900
Diffstat (limited to 'ext/libav/gstavdemux.c')
-rw-r--r--ext/libav/gstavdemux.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/libav/gstavdemux.c b/ext/libav/gstavdemux.c
index 7de25e4..c296238 100644
--- a/ext/libav/gstavdemux.c
+++ b/ext/libav/gstavdemux.c
@@ -26,6 +26,7 @@
#include <string.h>
#include <libavformat/avformat.h>
+#include <libavutil/imgutils.h>
/* #include <ffmpeg/avi.h> */
#include <gst/gst.h>
#include <gst/base/gstflowcombiner.h>
@@ -1491,7 +1492,7 @@ gst_ffmpegdemux_loop (GstFFMpegDemux * demux)
/* copy the data from packet into the target buffer
* and do conversions for raw video packets */
if (rawvideo) {
- AVPicture src, dst;
+ AVFrame src, dst;
const gchar *plugin_name =
((GstFFMpegDemuxClass *) (G_OBJECT_GET_CLASS (demux)))->in_plugin->name;
GstMapInfo map;
@@ -1506,8 +1507,9 @@ gst_ffmpegdemux_loop (GstFFMpegDemux * demux)
avstream->codec->pix_fmt, avstream->codec->width,
avstream->codec->height);
- av_picture_copy (&dst, &src, avstream->codec->pix_fmt,
- avstream->codec->width, avstream->codec->height);
+ av_image_copy (dst.data, dst.linesize, (const uint8_t **) src.data,
+ src.linesize, avstream->codec->pix_fmt, avstream->codec->width,
+ avstream->codec->height);
gst_buffer_unmap (outbuf, &map);
} else {
gst_buffer_fill (outbuf, 0, pkt.data, outsize);