From patchwork Tue Jan 21 08:49:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Fu, Linjie" X-Patchwork-Id: 17448 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 67D7444A7A7 for ; Tue, 21 Jan 2020 10:50:51 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3AB1D68B066; Tue, 21 Jan 2020 10:50:51 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9EBE768AE7D for ; Tue, 21 Jan 2020 10:50:44 +0200 (EET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Jan 2020 00:50:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,345,1574150400"; d="scan'208";a="215466343" Received: from icl-dev.sh.intel.com ([10.239.158.73]) by orsmga007.jf.intel.com with ESMTP; 21 Jan 2020 00:50:41 -0800 From: Linjie Fu To: ffmpeg-devel@ffmpeg.org Date: Tue, 21 Jan 2020 16:49:46 +0800 Message-Id: <1579596586-25100-1-git-send-email-linjie.fu@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [FFmpeg-devel] [PATCH] lavfi/qsvvpp: check return value for av_frame_copy_props 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: Linjie Fu MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Linjie Fu --- libavfilter/qsvvpp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavfilter/qsvvpp.c b/libavfilter/qsvvpp.c index 8d5ff2e..0006f48 100644 --- a/libavfilter/qsvvpp.c +++ b/libavfilter/qsvvpp.c @@ -311,12 +311,11 @@ static QSVFrame *submit_frame(QSVVPPContext *s, AVFilterLink *inlink, AVFrame *p qsv_frame->frame->width = picref->width; qsv_frame->frame->height = picref->height; - if (av_frame_copy(qsv_frame->frame, picref) < 0) { + if (av_frame_copy(qsv_frame->frame, picref) < 0 || + av_frame_copy_props(qsv_frame->frame, picref) < 0) { av_frame_free(&qsv_frame->frame); return NULL; } - - av_frame_copy_props(qsv_frame->frame, picref); } else qsv_frame->frame = av_frame_clone(picref);