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 3AB2548CAE for ; Wed, 24 Jan 2024 08:21:18 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2043968D1E5; Wed, 24 Jan 2024 10:17:56 +0200 (EET) Received: from mail1.khirnov.net (quelana.khirnov.net [94.230.150.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6E5A368D13D for ; Wed, 24 Jan 2024 10:17:26 +0200 (EET) Authentication-Results: mail1.khirnov.net; dkim=pass (2048-bit key; unprotected) header.d=khirnov.net header.i=@khirnov.net header.a=rsa-sha256 header.s=mail header.b=WKtuPauU; dkim-atps=neutral Received: from localhost (mail1.khirnov.net [IPv6:::1]) by mail1.khirnov.net (Postfix) with ESMTP id 9747C1C17 for ; Wed, 24 Jan 2024 09:17:21 +0100 (CET) Received: from mail1.khirnov.net ([IPv6:::1]) by localhost (mail1.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id d5m5B8KNjcdL for ; Wed, 24 Jan 2024 09:17:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1706084239; bh=BpCXtVKx6vt6tGJQlGiDZN5RU2icJ5vxgXlU1WM0jKA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=WKtuPauUxFiJMX8ddOlACqkPnS886JUyQ6lTG2DGiwCaNPW3G5hUNocio829hUwMA E+RKEyxvXlk+dppiWGuF+VQbPGayY6Z4r+Osy9u94Hb6lFKLikOfiQlanqKglUKjmZ hAUU7HgVk0Fj8gVc8bOSOkGVxEfw5PRcYQQTu5H2q65JsbGv7fOk/I6gZZPCCsdUr5 6lHn5O9EkvTamfS489Kb5evLoeaUeIBiLHmQHoROjXi8jJZtIgKqdE7vp6aNZhhx2R BUJsjgz4mI2msHSocq/+ieALdOeThAwcA4x2Iiojx4xZ7VTydaYyOsoexVqE+dWKLQ HUiXKSkgtNxtw== Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail1.khirnov.net (Postfix) with ESMTPS id 9B9711A0C for ; Wed, 24 Jan 2024 09:17:19 +0100 (CET) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:::1]) by libav.khirnov.net (Postfix) with ESMTP id 76B053A0819 for ; Wed, 24 Jan 2024 09:17:19 +0100 (CET) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Wed, 24 Jan 2024 09:16:38 +0100 Message-ID: <20240124081702.4759-8-anton@khirnov.net> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20240124081702.4759-1-anton@khirnov.net> References: <20240124081702.4759-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 08/31] fftools/ffmpeg_dec: drop useless and racy code 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 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: Setting demuxer's video_delay from the decoder cannot accomplish anything meaningful and is racy, as they run in different threads. --- fftools/ffmpeg_dec.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/fftools/ffmpeg_dec.c b/fftools/ffmpeg_dec.c index 4a59a4b392..baaba966c6 100644 --- a/fftools/ffmpeg_dec.c +++ b/fftools/ffmpeg_dec.c @@ -263,21 +263,6 @@ static int video_frame_process(InputStream *ist, AVFrame *frame) { DecoderPriv *dp = dp_from_dec(ist->decoder); - // The following line may be required in some cases where there is no parser - // or the parser does not has_b_frames correctly - if (ist->par->video_delay < dp->dec_ctx->has_b_frames) { - if (dp->dec_ctx->codec_id == AV_CODEC_ID_H264) { - ist->par->video_delay = dp->dec_ctx->has_b_frames; - } else - av_log(dp->dec_ctx, AV_LOG_WARNING, - "video_delay is larger in decoder than demuxer %d > %d.\n" - "If you want to help, upload a sample " - "of this file to https://streams.videolan.org/upload/ " - "and contact the ffmpeg-devel mailing list. (ffmpeg-devel@ffmpeg.org)\n", - dp->dec_ctx->has_b_frames, - ist->par->video_delay); - } - if (dp->dec_ctx->width != frame->width || dp->dec_ctx->height != frame->height || dp->dec_ctx->pix_fmt != frame->format) { -- 2.42.0 _______________________________________________ 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".