From: "Jan Ekström" <jeebjp@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: [FFmpeg-devel] [PATCH v6 2/3] ffmpeg: move decoded frame counter from after post-processing to decode
Date: Mon, 19 Dec 2022 09:34:07 +0200
Message-ID: <20221219073408.11501-3-jeebjp@gmail.com> (raw)
In-Reply-To: <20221219073408.11501-1-jeebjp@gmail.com>
From: Jan Ekström <jan.ekstrom@24i.com>
This way we can call process_subtitles without causing the decoded
frame counter to get bumped.
Additionally, this now takes into mention all of the decoded
subtitle frames without fix_sub_duration latency/buffering, or filtering
out decoded reset/end subtitles without any rendered rectangles, which
matches the original intent in 4754345027eb85cfa51aeb88beec68d7b036c11e
.
Signed-off-by: Jan Ekström <jan.ekstrom@24i.com>
---
fftools/ffmpeg.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index eaf0a40328..3b94eaaa58 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -2232,8 +2232,6 @@ static int process_subtitle(InputStream *ist, AVSubtitle *subtitle, int *got_out
if (!subtitle->num_rects)
goto out;
- ist->frames_decoded++;
-
for (OutputStream *ost = ost_iter(NULL); ost; ost = ost_iter(ost)) {
if (!check_output_constraints(ist, ost) || !ost->enc_ctx
|| ost->enc_ctx->codec_type != AVMEDIA_TYPE_SUBTITLE)
@@ -2264,6 +2262,8 @@ static int transcode_subtitles(InputStream *ist, AVPacket *pkt, int *got_output,
return ret;
}
+ ist->frames_decoded++;
+
return process_subtitle(ist, &subtitle, got_output);
}
--
2.38.1
_______________________________________________
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".
next prev parent reply other threads:[~2022-12-19 7:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-19 7:34 [FFmpeg-devel] [PATCH v6 0/3] ffmpeg: add video heartbeat capability to fix_sub_duration Jan Ekström
2022-12-19 7:34 ` [FFmpeg-devel] [PATCH v6 1/3] ffmpeg: refactor post-decoding steps for subtitles into a function Jan Ekström
2022-12-19 7:34 ` Jan Ekström [this message]
2022-12-19 7:34 ` [FFmpeg-devel] [PATCH v6 3/3] ffmpeg: add video heartbeat capability to fix_sub_duration Jan Ekström
2023-01-09 15:10 ` [FFmpeg-devel] [PATCH v6 0/3] " Jan Ekström
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221219073408.11501-3-jeebjp@gmail.com \
--to=jeebjp@gmail.com \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git