From patchwork Fri Jun 19 06:47:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xiang, Haihao" X-Patchwork-Id: 20494 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 54C8E44B142 for ; Fri, 19 Jun 2020 09:48:16 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3044668B5C6; Fri, 19 Jun 2020 09:48:16 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3685468B510 for ; Fri, 19 Jun 2020 09:48:09 +0300 (EEST) IronPort-SDR: AHzfpikHoc4dhj36y+8ksS322uOJUPXQktcHUtuWLoxzYGNwbXKVOquRDyHRzHFYB3OOofdQTb EK12X+rbd5pg== X-IronPort-AV: E=McAfee;i="6000,8403,9656"; a="140396357" X-IronPort-AV: E=Sophos;i="5.75,254,1589266800"; d="scan'208";a="140396357" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2020 23:48:07 -0700 IronPort-SDR: xa2/KNj3fORz/PvlnUSWd+/QVQ0XvEL5rEAJ3GudwPRIhWZhcPdpD4zdVys9oyYdBPDdTsD8VK zunNe7jwttvw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,254,1589266800"; d="scan'208";a="277905068" Received: from xhh-tgl64.sh.intel.com ([10.239.159.24]) by orsmga006.jf.intel.com with ESMTP; 18 Jun 2020 23:48:06 -0700 From: Haihao Xiang To: ffmpeg-devel@ffmpeg.org Date: Fri, 19 Jun 2020 14:47:32 +0800 Message-Id: <20200619064733.146001-1-haihao.xiang@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] hwcontext_vaapi: the first parameter is the AVHWFramesContext for dst X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Haihao Xiang Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" 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 --- 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;