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 6D9AF49505 for ; Wed, 13 Mar 2024 12:28:42 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4D6DD68D09E; Wed, 13 Mar 2024 14:28:40 +0200 (EET) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 9BDE468C1A3 for ; Wed, 13 Mar 2024 14:28:33 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1710332913; bh=HHT2UY9XntMyyO3RbROIM2ckAAbBiqfAq582DcuJxuY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=FoBSxAjZOPHRQycVJPl7gAOxbP1QYeYW2KZUIxdbZ54OrUygkd3IzKg6Ww6zn4qB6 1KI5nnZYixqMujXVTF+SHkytHlv2yBQOTqMMUN/45u65KXt4rwPVYgp24KGp6vma6A B/utXCdICileAR8CsvP6MMx58R7EX/Dw2eETO5GM= Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 5946A40703; Wed, 13 Mar 2024 13:28:33 +0100 (CET) Date: Wed, 13 Mar 2024 13:28:33 +0100 Message-ID: <20240313132833.GB93915@haasn.xyz> From: Niklas Haas To: ffmpeg-devel@ffmpeg.org In-Reply-To: <20240313122425.92457-2-ffmpeg@haasn.xyz> References: <20240313122425.92457-1-ffmpeg@haasn.xyz> <20240313122425.92457-2-ffmpeg@haasn.xyz> MIME-Version: 1.0 Content-Disposition: inline Subject: Re: [FFmpeg-devel] [PATCH 2/2] avfilter/vf_scale2ref: switch to FFFrameSync 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: Niklas Haas 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: On Wed, 13 Mar 2024 13:24:25 +0100 Niklas Haas wrote: > - frame_changed = in->width != link->w || > - in->height != link->h || > - in->format != link->format || > - in->sample_aspect_ratio.den != link->sample_aspect_ratio.den || > - in->sample_aspect_ratio.num != link->sample_aspect_ratio.num || > - in->colorspace != link->colorspace || > - in->color_range != link->color_range; > + ret = ff_framesync_dualinput_get(fs, &main, &ref); > + if (ret < 0) > + return ret; > > - if (frame_changed) { > - link->format = in->format; > - link->w = in->width; > - link->h = in->height; > - link->sample_aspect_ratio.num = in->sample_aspect_ratio.num; > - link->sample_aspect_ratio.den = in->sample_aspect_ratio.den; > - link->colorspace = in->colorspace; > - link->color_range = in->color_range; > + if (ref) { > + reflink->format = ref->format; > + reflink->w = ref->width; > + reflink->h = ref->height; > + reflink->sample_aspect_ratio.num = ref->sample_aspect_ratio.num; > + reflink->sample_aspect_ratio.den = ref->sample_aspect_ratio.den; > + reflink->colorspace = ref->colorspace; > + reflink->color_range = ref->color_range; > > - config_props_ref(outlink); > - } > + ret = config_props(outlink); > + if (ret < 0) > + return ret; This change unintentionally dropped the `frame_changed` check to avoid reconfiguring the sws context unnecessarily. Fixed locally by reintroducing the check. _______________________________________________ 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".