From patchwork Mon Nov 23 19:52:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Musee Ullah X-Patchwork-Id: 24014 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 C81C844916F for ; Mon, 23 Nov 2020 21:52:28 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A1CA368BBE0; Mon, 23 Nov 2020 21:52:28 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mio.sys.idolactiviti.es (mio.sys.idolactiviti.es [108.61.247.252]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B751C68BBDE for ; Mon, 23 Nov 2020 21:52:21 +0200 (EET) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id BA77D627D5; Mon, 23 Nov 2020 19:52:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lae.is; s=dkim; t=1606161138; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding; bh=sSJ8jzbgf1uykCUm3i9dpnpT6aux98pIcH9GHY5X4jI=; b=aDlPzP/MGTgNeTZ32WoP5xwuKA8wjJ+qClOahw5rvhB6TFYCtawACcv8RLnWXTqV1ReJ3r Rr319oM6654t2GkBNUcGZL5SqcEmckjv4Tqt7LOx28sFBSsNYtrBhK9A9DxxKgZYyv2vOp 89KPOAr7iFNS3sFTGGcg2QKAur99Soyjq+3v/0I6UDc0BHu0xdaafQN1YFlMZbdeKWMR/o nSOLKxD6yOBV9fwO2TXwznRnJs/w8D8qIOdbBV5Gq9r7DaEoJuHG7pA2RwiKqZlJXqVaL+ /VPYQuA2x7dI1dvh5DnARqdYjHnqbkpkNEewHSFBGX0k2AC0Yv+CVGAXLlmJJQ== From: Musee Ullah To: ffmpeg-devel@ffmpeg.org Date: Mon, 23 Nov 2020 13:52:01 -0600 Message-Id: <20201123195200.886591-1-lae@lae.is> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 Subject: [FFmpeg-devel] [PATCH] av_filter/vf_xfade: ensure metadata is copied to transition frames 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: Musee Ullah Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" I was having an issue where, using a filter chain of xfade -> ass, the colors on the subtitles were incorrect only on the frames where xfade was being used. This resolves that issue for me. Signed-off-by: Musee Ullah --- libavfilter/vf_xfade.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/vf_xfade.c b/libavfilter/vf_xfade.c index 6b94cc7036..4e07d7b525 100644 --- a/libavfilter/vf_xfade.c +++ b/libavfilter/vf_xfade.c @@ -1830,6 +1830,7 @@ static int xfade_frame(AVFilterContext *ctx, AVFrame *a, AVFrame *b) out = ff_get_video_buffer(outlink, outlink->w, outlink->h); if (!out) return AVERROR(ENOMEM); + av_frame_copy_props(out, a); td.xf[0] = a, td.xf[1] = b, td.out = out, td.progress = progress; ctx->internal->execute(ctx, xfade_slice, &td, NULL, FFMIN(outlink->h, ff_filter_get_nb_threads(ctx)));