#if CONFIG_DXVA2
&ff_hwcontext_type_dxva2,
#endif
-#if CONFIG_LIBMFX
+#if CONFIG_QSV
&ff_hwcontext_type_qsv,
#endif
#if CONFIG_VAAPI
static int transfer_data_alloc(AVFrame *dst, const AVFrame *src, int flags)
{
+ AVHWFramesContext *ctx = (AVHWFramesContext*)src->hw_frames_ctx->data;
AVFrame *frame_tmp;
int ret = 0;
frame_tmp->format = formats[0];
av_freep(&formats);
}
- frame_tmp->width = src->width;
- frame_tmp->height = src->height;
+ frame_tmp->width = ctx->width;
+ frame_tmp->height = ctx->height;
ret = av_frame_get_buffer(frame_tmp, 32);
if (ret < 0)
if (ret < 0)
goto fail;
+ frame_tmp->width = src->width;
+ frame_tmp->height = src->height;
+
av_frame_move_ref(dst, frame_tmp);
fail: