From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 637DB40BFA for ; Tue, 16 Dec 2025 14:20:58 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'KiyX09z5WmEByrQGWdFQ5kh/HshTCcaMOpf/CiTpllw=', expected b'Xf20nlbvJhtTo6f85uBraNKoeVktk0mc/Xs8Te9UKfY=')) header.d=ffmpeg.org header.i=@ffmpeg.org header.a=rsa-sha256 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1765894849; h=mime-version : to : date : message-id : reply-to : subject : list-id : list-archive : list-archive : list-help : list-owner : list-post : list-subscribe : list-unsubscribe : from : cc : content-type : content-transfer-encoding : from; bh=KiyX09z5WmEByrQGWdFQ5kh/HshTCcaMOpf/CiTpllw=; b=A6K/+10lm14+E3z6lcozAgh05ea2FPUSVF2i8k4lYv87MOkz3XSIkRuG1IS3WRb9Ax4fg pFdjrBWPTpp2uLFXDnXYPgBkkdJyzAIHnh6k4EX2585ypbM9UnFiakpa9KUTPqWsYkbnxLp ZU1efl5Rv5mZZWCfvlDoS5x1FXZ1ve0SOlKNctdFoXeoUIXmCGYeBp+aZFO67DxV6wx3N93 yxMg4C1LOdIr8zBcCXPmLr3A6m2qB+OlOjCtSB4Asv8wP6fl0hVxMRfvKf7OicaQiZXE2bM DtZezIDB2Rnn3245gg3vDlp7JvBOXMCXK74UYNfJhFiYWlppWW3qNS2MPpJw== Received: from [172.20.0.2] (unknown [172.19.0.4]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id AD95C6908BD; Tue, 16 Dec 2025 16:20:49 +0200 (EET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1765894841; b=nsBVdqkBRTFL6eWopuUwV8Yex8e7D8+CMqRXUcbA0+fG92GTXEHsJujaAuKzg32Z82xUU yUiQ9sHD3zZi8M4mF76jcozKmtcBA0Cmq24B+52fxvhP72vTru4WUOcBYyiTjoXJ6P0Swmh GEeQkzEYALZWV65Sayh8uT4rQWrmLTqItOk/YTodt69sVPLFDHU+BY1X7faNWNQPnAnAMz0 m/X6YmMFvZZI/YEcuU2swIR6/wbXa4f4r8Dt9E0UatyKfWT+ESIuXWLnS4i8+055agb52bI Fs9ULLlWJXi7bRSBwEabNSOwLhCFOuNPjMWPJ5MgVu6n9y1x42jtHzrKNpgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1765894841; h=from : sender : reply-to : subject : date : message-id : to : cc : mime-version : content-type : content-transfer-encoding : content-id : content-description : resent-date : resent-from : resent-sender : resent-to : resent-cc : resent-message-id : in-reply-to : references : list-id : list-help : list-unsubscribe : list-subscribe : list-post : list-owner : list-archive; bh=UOUOUKA17dxvKiHxyW3ouGaegNXN4LGtdH59I0D69hI=; b=P4tUx20e6CsXRIMvFXdVWfHBv1cd5rD0IuxlUhYWQ+JXAE//JIMkW+IC8OCRvNdfgwpVM o4yBDl8yozKc4Xvxy8//ZZPb//VWRFIIelonoDvqnOCpmycVMmBrv8p9UcA0IKTtQk29Hbf OIvKG8bjWgGjNCeXmmdi3kT9iQi9G/+81w9JPhvCpkByJnWUQ0gGdB9O2c+a1UYtbL0I/ok GkyxlMzWwOxjRlVOyEey5WxncOkVTrjwp5vCBER2pvgUGQ7dNSqLaxedGgqrSrosKAEvKG8 0z7vttaTGA7d7l0dQfCvX9DCwd7q9BIwVNVzA1ZK+BGGJ553cvvlMtXYaGmw== ARC-Authentication-Results: i=1; ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none; dmarc=pass header.from=ffmpeg.org policy.dmarc=quarantine Authentication-Results: ffmpeg.org; dkim=pass header.d=ffmpeg.org header.i=@ffmpeg.org; arc=none (Message is not ARC signed); dmarc=pass (Used From Domain Record) header.from=ffmpeg.org policy.dmarc=quarantine DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ffmpeg.org; i=@ffmpeg.org; q=dns/txt; s=mail; t=1765894835; h=content-type : mime-version : content-transfer-encoding : from : to : reply-to : subject : date : from; bh=Xf20nlbvJhtTo6f85uBraNKoeVktk0mc/Xs8Te9UKfY=; b=cowZIAgzLV8C+0cXUcqYqDsllUm5lZLylExZlb8nMxhy9y215kkpS+NzPF68FbRVSW0qg nH7WZOhaxNQaypacdTP1o96UBgwTf1T+cdOenzdVejCGwDcUk2Rwx5EU9UrnRZCFjPcQZbq IkdPKAdgDoKQIPRYU+8WsJDgNcmg1L/XIYe8CcPPQqrvjzZ3oi+ffYwgXtfFvhLC8ps6E/Y GSNxjbKs7YzVQD5CrTvV+DcJmMXSfKJT16lCfh9vRNSteVAxTveOde4Pu3p5eOG7SYVExNa pKsdNByYzsC+HpMNmuJcO+K/j8mFqnQsFo8/9gVcWb5jGeF4kBlm+klW1Tkg== Received: from 55ca25703178 (code.ffmpeg.org [188.245.149.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 6C10F68D296 for ; Tue, 16 Dec 2025 16:20:35 +0200 (EET) MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Date: Tue, 16 Dec 2025 14:20:35 -0000 Message-ID: <176589483556.60.14820417131956836447@2cb04c0e5124> Message-ID-Hash: 42TY5JDTN6MABRFZWP3OIISX7TSUYMFI X-Message-ID-Hash: 42TY5JDTN6MABRFZWP3OIISX7TSUYMFI X-MailFrom: code@ffmpeg.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-ffmpeg-devel.ffmpeg.org-0; header-match-ffmpeg-devel.ffmpeg.org-1; header-match-ffmpeg-devel.ffmpeg.org-2; header-match-ffmpeg-devel.ffmpeg.org-3; emergency; member-moderation X-Mailman-Version: 3.3.10 Precedence: list Reply-To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH] avcodec/demux: validate avctx state in has_decode_delay_been_guessed (PR #21215) List-Id: FFmpeg development discussions and patches Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Timo Rothenpieler via ffmpeg-devel Cc: Timo Rothenpieler Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Archived-At: List-Archive: List-Post: PR #21215 opened by Timo Rothenpieler (BtbN) URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21215 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21215.patch There are cases where the codecpar and avctx codec can differ, or potentially the latter might not even be opened. Fixes #YWH-PGM40646-20 >>From 5107836dc9fb4bf433295f00891c52c80f2cfdd2 Mon Sep 17 00:00:00 2001 From: Timo Rothenpieler Date: Tue, 16 Dec 2025 15:17:55 +0100 Subject: [PATCH] avcodec/demux: validate avctx state in has_decode_delay_been_guessed Fixes #YWH-PGM40646-20 --- libavformat/demux.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/demux.c b/libavformat/demux.c index 934eb80553..3777b5288f 100644 --- a/libavformat/demux.c +++ b/libavformat/demux.c @@ -752,6 +752,8 @@ static int has_decode_delay_been_guessed(AVStream *st) if (st->codecpar->codec_id != AV_CODEC_ID_H264) return 1; if (!sti->info) // if we have left find_stream_info then nb_decoded_frames won't increase anymore for stream copy return 1; + if (!avcodec_is_open(sti->avctx) || sti->avctx->codec_id != AV_CODEC_ID_H264) + return 1; #if CONFIG_H264_DECODER if (sti->avctx->has_b_frames && avpriv_h264_has_num_reorder_frames(sti->avctx) == sti->avctx->has_b_frames) -- 2.49.1 _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org