From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id D74C348AA9 for ; Fri, 29 Dec 2023 18:51:25 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D93AB68CC3E; Fri, 29 Dec 2023 20:51:16 +0200 (EET) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2C15068CBD1 for ; Fri, 29 Dec 2023 20:51:10 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id F2906E7DBB; Fri, 29 Dec 2023 19:51:09 +0100 (CET) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QOwEozFyD4qY; Fri, 29 Dec 2023 19:51:08 +0100 (CET) Received: from bluegene.passwd.hu (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 6800DE9298; Fri, 29 Dec 2023 19:51:08 +0100 (CET) From: Marton Balint To: ffmpeg-devel@ffmpeg.org Date: Fri, 29 Dec 2023 19:50:58 +0100 Message-Id: <20231229185059.18462-2-cus@passwd.hu> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20231229185059.18462-1-cus@passwd.hu> References: <20231229185059.18462-1-cus@passwd.hu> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/3] fftools/ffmpeg_filter: honor -reinit_filters 0 even on changed display matrix X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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: Marton Balint Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Not sure about honoring it also in case of a hwaccel change, so left that as is for now. Signed-off-by: Marton Balint --- fftools/ffmpeg_filter.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index c1c3014453..680fffb060 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -2607,13 +2607,6 @@ static int send_frame(FilterGraph *fg, FilterGraphThread *fgt, break; } - if (!ifp->ist->reinit_filters && fgt->graph) - need_reinit = 0; - - if (!!ifp->hw_frames_ctx != !!frame->hw_frames_ctx || - (ifp->hw_frames_ctx && ifp->hw_frames_ctx->data != frame->hw_frames_ctx->data)) - need_reinit = 1; - if (sd = av_frame_get_side_data(frame, AV_FRAME_DATA_DISPLAYMATRIX)) { if (!ifp->displaymatrix_present || memcmp(sd->data, ifp->displaymatrix, sizeof(ifp->displaymatrix))) @@ -2621,6 +2614,13 @@ static int send_frame(FilterGraph *fg, FilterGraphThread *fgt, } else if (ifp->displaymatrix_present) need_reinit = 1; + if (!ifp->ist->reinit_filters && fgt->graph) + need_reinit = 0; + + if (!!ifp->hw_frames_ctx != !!frame->hw_frames_ctx || + (ifp->hw_frames_ctx && ifp->hw_frames_ctx->data != frame->hw_frames_ctx->data)) + need_reinit = 1; + if (need_reinit) { ret = ifilter_parameters_from_frame(ifilter, frame); if (ret < 0) -- 2.35.3 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".