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 3BE9F4E734 for ; Thu, 29 Jan 2026 15:29:16 +0000 (UTC) Authentication-Results: ffbox; dkim=fail (body hash mismatch (got b'uoWZ8sPkgYP46kbsixy71wUwh0tr7VbImfaG0xWHH3s=', expected b'qVC8OvCMdUvn7/XF4zki3n3baDDTzw6+FVbEiFJ27rA=')) 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=1769700546; 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=uoWZ8sPkgYP46kbsixy71wUwh0tr7VbImfaG0xWHH3s=; b=SJ96DMx7Ev8H89gfyXv1JLqG6fCIfmZ2IDwoFviJy+kVWGxd8DNwb/E0ue2AyYys9Pqmv 7rxnBfC63omxU/O0y70zb5z3g7Gy63xzB5COIvv2mi1hZYIA++Ze3214ksS868205Fy9loo 6CIqbHD5iiB1Hxest17c4KnPptAsksE28PMFCkJ9hIoyCD9VZm5ielnOEqCxs7tR66itiv9 7viMJIUIwPzHsRqHllUdKF0Zx0qLsJZaSL5ZhWdk3Rl0D1H7wNVV+U0yNyPJLoga15zY+w/ OG4tJf0i8sDVvpwfW/oFtz2X3zPTsy1hwzZ6l7n6fxiOOZ/PJ47/Bpalkz4Q== Received: from [172.20.0.4] (unknown [172.20.0.4]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id EB4D8690F1C; Thu, 29 Jan 2026 17:29:06 +0200 (EET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=ffmpeg.org; s=arc; t=1769700532; b=YR31C5dLHaTyWeT06m752VaLg9CEkr1uKWxfLl4tmj9nwoRdBnQ3c4KGPf40ZPQyRAKB3 25aqIX+R9grjODXHYPT+RtzPjZkUluPreFTfEV9AHh3Q01Wl2AkBadb47tIJvSjVUoyvlke DWYqc/8rRaWcMa/F18aeJ1JQfnnXqC5IKeGwg087R2gS8p18BdBnOvm0tjb/ffJ+0yIhxVa HCZJoeBYfIwnJfzdE0Ae7k5O9akMrFXKOx7kahksZdqi2lPGbjyf2mD2d9r7zr0zvJAuPeq Rxvxiw4IUiCSQ1gT86mwu3DTZG1Ngd4vGP49bcsreUNIImKvuBlTucaN5pHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=ffmpeg.org; s=arc; t=1769700532; 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=uZ57RI7svI8j+sQFstF4ylPRiuirA7OhUS7wgzAaNCk=; b=odW92mYxVKcEitgEmH78bViYsC4iBJcvh7zQ+uBKYKWfB8Biq2PKqWKgVldH8ZAAXRGTL +9ChunZ8lghkHk7Ck+TM7qwv+ZR7gLAazSnSYGjR9AhoCGo8iLp84S6AfZBh/iLHpuuLNmD xcTAQoSW43X3fIeh1jTBKREjaXC1VDXdwW9HTUNmY9aNuBTzmRuml4rIfG4MoNBgNUW1NAF N+zQEO1H5YRM/xgjAwcA1eHsIbhM48uZiCHi6UQ8kmB/wO7/rEyHI804Az8PS00Y4jCsSbO 8zUU5Uurb1qF+1D2+X/JTu5VlBjrQJ4Kd7YTc05NB1LZRUWI9dyM1j4/K0Zg== 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=1769700524; h=content-type : mime-version : content-transfer-encoding : from : to : reply-to : subject : date : from; bh=qVC8OvCMdUvn7/XF4zki3n3baDDTzw6+FVbEiFJ27rA=; b=ACFlWVow1AoriE7YXSqLFCq2xgyW/IfEnUPpcZVaiKudgk8xH+W63ex9jA1g8NPGGoS17 CiNIAyXgVFBrWKcRNUkR6q4l14LFImH4RaYojvpUF8CJLMTY05BTe0n5m0rXAasMaJiB4x/ uIYxvHBpgRIdOKjsbYPwSwJgPRpXuRVK04LwYVefWWp9jPhmP3Y4zE9iZu0hIGrqUEmfMpZ ctUEpgVLqhbKXa2HV7rBq5LX8w/y6bF3pcHUhj3KPazxCvq5zAuGwtilPQUM+G2qLKPfwfL PsjpfKotu5yaNYxvUzD78YQCDmmyCrWNPPdrfZUZNrn+N71FGfaUp8yhGrpw== Received: from c8d966988b92 (code.ffmpeg.org [188.245.149.3]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id AF297690E68 for ; Thu, 29 Jan 2026 17:28:44 +0200 (EET) MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org Date: Thu, 29 Jan 2026 15:28:44 -0000 Message-ID: <176970052481.25.18385653050573282801@4457048688e7> Message-ID-Hash: BODYEBFZKFDK3752ST7EAZKOEHLABJXJ X-Message-ID-Hash: BODYEBFZKFDK3752ST7EAZKOEHLABJXJ 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] [PR] fftools/ffprobe: keep decoder buffers unflushed for show_streams() (PR #21605) 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: ngaullier via ffmpeg-devel Cc: ngaullier Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Archived-At: List-Archive: List-Post: PR #21605 opened by ngaullier URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21605 Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/21605.patch When a decoder buffer is flushed, parts of the private context is reset, which may affect show_streams(). Example: ffprobe -of flat fate-suite/ac3/mp3ac325-4864-small.ts \ -analyze_frames -show_entries stream=ltrt_cmixlev Before: ltrt_cmixlev="0.000000" After: ltrt_cmixlev="0.707107" Currently, it seems that only ac3 downmix info is concerned. (ac3 downmix options are exported since 376bb8481ada994ffe16d0a02f6c8767bac21016). Fix regression since 045a8b15b19ec7f872fb01cfb986faeaa26cb8bb. Signed-off-by: Nicolas Gaullier >>From 0204f391722f8c82d49bb94220ef7c8429d2c6e5 Mon Sep 17 00:00:00 2001 From: Nicolas Gaullier Date: Tue, 27 Jan 2026 17:29:11 +0100 Subject: [PATCH] fftools/ffprobe: keep decoder buffers unflushed for show_streams() When a decoder buffer is flushed, parts of the private context is reset, which may affect show_streams(). Example: ffprobe -of flat fate-suite/ac3/mp3ac325-4864-small.ts \ -analyze_frames -show_entries stream=ltrt_cmixlev Before: ltrt_cmixlev="0.000000" After: ltrt_cmixlev="0.707107" Currently, it seems that only ac3 downmix info is concerned. (ac3 downmix options are exported since 376bb8481ada994ffe16d0a02f6c8767bac21016). Fix regression since 045a8b15b19ec7f872fb01cfb986faeaa26cb8bb. Signed-off-by: Nicolas Gaullier --- fftools/ffprobe.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 67111bc31f..f256d781d0 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -1695,8 +1695,6 @@ static int read_interval_packets(AVTextFormatContext *tfc, InputFile *ifile, pkt->stream_index = i; if (do_read_frames) { while (process_frame(tfc, ifile, frame, pkt, &(int){1}) > 0); - if (ifile->streams[i].dec_ctx) - avcodec_flush_buffers(ifile->streams[i].dec_ctx); } } @@ -1710,6 +1708,18 @@ end: return ret; } +static void flush_buffers(InputFile *ifile) +{ + int i; + + if (!do_read_frames) + return; + for (i = 0; i < ifile->nb_streams; i++) { + if (ifile->streams[i].dec_ctx) + avcodec_flush_buffers(ifile->streams[i].dec_ctx); + } +} + static int read_packets(AVTextFormatContext *tfc, InputFile *ifile) { AVFormatContext *fmt_ctx = ifile->fmt_ctx; @@ -1721,6 +1731,10 @@ static int read_packets(AVTextFormatContext *tfc, InputFile *ifile) ret = read_interval_packets(tfc, ifile, &interval, &cur_ts); } else { for (i = 0; i < read_intervals_nb; i++) { + /* flushing buffers can reset parts of the private context which may be + * readen by show_streams(), so only flush between each read_interval */ + if (i) + flush_buffers(ifile); ret = read_interval_packets(tfc, ifile, &read_intervals[i], &cur_ts); if (ret < 0) break; -- 2.52.0 _______________________________________________ ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org