‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Thursday, 18 de April de 2019 22:13, Michael Niedermayer <mich...@niedermayer.cc> wrote:
> On Thu, Apr 18, 2019 at 07:46:43AM +0000, Andreas Håkon via ffmpeg-devel > wrote: > > > Hi, > > This is the second part of my previous patch: > > https://patchwork.ffmpeg.org/patch/12783/ > > It improves the logs when the message "cur_dts is invalid" appears. > > If helps to identify which stream generates the trouble, > > and the status of the stream. > > A lot of users suffers with the message, and the origin varies. > > The improved message can help to discover the cause. > > Regards. > > A.H. > > > "git am" doesnt accept this patch > > Applying: libavformat: input init fix mpegts filters > Using index info to reconstruct a base tree... > error: patch failed: libavformat/utils.c:1402 > error: libavformat/utils.c: patch does not apply > error: Did you hand edit your patch? > It does not apply to blobs recorded in its index. > Patch failed at 0001 libavformat: input init fix mpegts filters > hint: Use 'git am --show-current-patch' to see the failed patch > When you have resolved this problem, run "git am --continue". > If you prefer to skip this patch, run "git am --skip" instead. > To restore the original branch and stop patching, run "git am --abort". > Sorry Michael! I re-created the patch with a clean copy. Here it is. Regards. A.H. ---
From 88dd030ddcde04b425bf1896ea6c1a2f263dc2ac Mon Sep 17 00:00:00 2001 From: Andreas Hakon <andreas.ha...@protonmail.com> Date: Fri, 19 Apr 2019 08:58:37 +0100 Subject: [PATCH] libavformat: improve logs with cur_dts v2 This patch improves the logs when the message "cur_dts is invalid" appears. If helps to identify which stream generates the trouble, and the status of the stream. A lot of users suffers with the message, and the origin varies. The improved message can help to discover the cause. Signed-off-by: Andreas Hakon <andreas.ha...@protonmail.com> --- fftools/ffmpeg.c | 4 +++- libavformat/utils.c | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 0f157d6..01f0410 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -3875,7 +3875,9 @@ static OutputStream *choose_output(void) av_rescale_q(ost->st->cur_dts, ost->st->time_base, AV_TIME_BASE_Q); if (ost->st->cur_dts == AV_NOPTS_VALUE) - av_log(NULL, AV_LOG_DEBUG, "cur_dts is invalid (this is harmless if it occurs once at the start per stream)\n"); + av_log(NULL, AV_LOG_DEBUG, + "cur_dts is invalid st:%d (%d) [init:%d i_done:%d finish:%d] (this is harmless if it occurs once at the start per stream)\n", + ost->st->index, ost->st->id, ost->initialized, ost->inputs_done, ost->finished); if (!ost->initialized && !ost->inputs_done) return ost; diff --git a/libavformat/utils.c b/libavformat/utils.c index 9b3f0d2..6ef9423 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1402,8 +1402,8 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, st->cur_dts = pkt->dts; if (s->debug & FF_FDEBUG_TS) - av_log(s, AV_LOG_DEBUG, "OUTdelayed:%d/%d pts:%s, dts:%s cur_dts:%s\n", - presentation_delayed, delay, av_ts2str(pkt->pts), av_ts2str(pkt->dts), av_ts2str(st->cur_dts)); + av_log(s, AV_LOG_DEBUG, "OUTdelayed:%d/%d pts:%s, dts:%s cur_dts:%s st:%d (%d)\n", + presentation_delayed, delay, av_ts2str(pkt->pts), av_ts2str(pkt->dts), av_ts2str(st->cur_dts), st->index, st->id); /* update flags */ if (st->codecpar->codec_type == AVMEDIA_TYPE_DATA || is_intra_only(st->codecpar->codec_id)) -- 1.7.10.4
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".