[FFmpeg-devel] [PATCH 1/2] hwcontext_vaapi: the first parameter is the AVHWFramesContext for dst
Haihao Xiang
haihao.xiang at intel.com
Fri Jun 19 09:47:32 EEST 2020
vaapi_map_from_drm() is the implementation of map_to when src format is
AV_PIX_FMT_DRM_PRIME, and the first parameter of map_to is the
AVHWFramesContext for dst
Signed-off-by: Haihao Xiang <haihao.xiang at intel.com>
---
libavutil/hwcontext_vaapi.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c
index b31cf95850..a378bcd12a 100644
--- a/libavutil/hwcontext_vaapi.c
+++ b/libavutil/hwcontext_vaapi.c
@@ -999,11 +999,11 @@ static void vaapi_unmap_from_drm(AVHWFramesContext *dst_fc,
vaDestroySurfaces(dst_dev->display, &surface_id, 1);
}
-static int vaapi_map_from_drm(AVHWFramesContext *src_fc, AVFrame *dst,
+static int vaapi_map_from_drm(AVHWFramesContext *dst_fc, AVFrame *dst,
const AVFrame *src, int flags)
{
- AVHWFramesContext *dst_fc =
- (AVHWFramesContext*)dst->hw_frames_ctx->data;
+ AVHWFramesContext *src_fc =
+ (AVHWFramesContext*)src->hw_frames_ctx->data;
AVVAAPIDeviceContext *dst_dev = dst_fc->device_ctx->hwctx;
const AVDRMFrameDescriptor *desc;
const VAAPIFormatDescriptor *format_desc;
--
2.25.1
More information about the ffmpeg-devel
mailing list