diff mbox series

[FFmpeg-devel,1/2] hwcontext_vaapi: the first parameter is the AVHWFramesContext for dst

Message ID 20200619064733.146001-1-haihao.xiang@intel.com
State New
Headers show
Series [FFmpeg-devel,1/2] hwcontext_vaapi: the first parameter is the AVHWFramesContext for dst
Related show


Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Xiang, Haihao June 19, 2020, 6:47 a.m. UTC
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@intel.com>
 libavutil/hwcontext_vaapi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series


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;