#include "imgutils.h"
#include "mem.h"
#include "samplefmt.h"
+#include "hwcontext.h"
#if FF_API_FRAME_GET_SET
MAKE_ACCESSORS(AVFrame, frame, int64_t, best_effort_timestamp)
tmp.channels = frame->channels;
tmp.channel_layout = frame->channel_layout;
tmp.nb_samples = frame->nb_samples;
- ret = av_frame_get_buffer(&tmp, 32);
+
+ if (frame->hw_frames_ctx)
+ ret = av_hwframe_get_buffer(frame->hw_frames_ctx, &tmp, 0);
+ else
+ ret = av_frame_get_buffer(&tmp, 32);
if (ret < 0)
return ret;
dst->height < src->height)
return AVERROR(EINVAL);
+ if (src->hw_frames_ctx || dst->hw_frames_ctx)
+ return av_hwframe_transfer_data(dst, src, 0);
+
planes = av_pix_fmt_count_planes(dst->format);
for (i = 0; i < planes; i++)
if (!dst->data[i] || !src->data[i])
#define LIBAVUTIL_VERSION_MAJOR 56
#define LIBAVUTIL_VERSION_MINOR 42
-#define LIBAVUTIL_VERSION_MICRO 101
+#define LIBAVUTIL_VERSION_MICRO 102
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
LIBAVUTIL_VERSION_MINOR, \