This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new b66c314c4b fftools/ffprobe: keep decoder buffers unflushed for
show_streams()
b66c314c4b is described below
commit b66c314c4b5e69036191b41ab0b0e7045f1a4da1
Author: Nicolas Gaullier <[email protected]>
AuthorDate: Tue Jan 27 17:29:11 2026 +0100
Commit: James Almer <[email protected]>
CommitDate: Thu Mar 12 12:18:58 2026 +0000
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 <[email protected]>
---
fftools/ffprobe.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
index c02df4b45f..c090e62099 100644
--- a/fftools/ffprobe.c
+++ b/fftools/ffprobe.c
@@ -1700,8 +1700,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);
}
}
@@ -1715,6 +1713,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;
@@ -1726,6 +1736,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
+ * read 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;
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]