mirror of
https://github.com/librempeg/librempeg
synced 2024-11-23 11:39:47 +00:00
libavformat: improve logs with cur_dts
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.hakon@protonmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
a87774636b
commit
e750dc9de6
@ -3875,7 +3875,9 @@ static OutputStream *choose_output(void)
|
|||||||
av_rescale_q(ost->st->cur_dts, ost->st->time_base,
|
av_rescale_q(ost->st->cur_dts, ost->st->time_base,
|
||||||
AV_TIME_BASE_Q);
|
AV_TIME_BASE_Q);
|
||||||
if (ost->st->cur_dts == AV_NOPTS_VALUE)
|
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)
|
if (!ost->initialized && !ost->inputs_done)
|
||||||
return ost;
|
return ost;
|
||||||
|
@ -1402,8 +1402,8 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
|
|||||||
st->cur_dts = pkt->dts;
|
st->cur_dts = pkt->dts;
|
||||||
|
|
||||||
if (s->debug & FF_FDEBUG_TS)
|
if (s->debug & FF_FDEBUG_TS)
|
||||||
av_log(s, AV_LOG_DEBUG, "OUTdelayed:%d/%d pts:%s, dts:%s cur_dts:%s\n",
|
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));
|
presentation_delayed, delay, av_ts2str(pkt->pts), av_ts2str(pkt->dts), av_ts2str(st->cur_dts), st->index, st->id);
|
||||||
|
|
||||||
/* update flags */
|
/* update flags */
|
||||||
if (st->codecpar->codec_type == AVMEDIA_TYPE_DATA || is_intra_only(st->codecpar->codec_id))
|
if (st->codecpar->codec_type == AVMEDIA_TYPE_DATA || is_intra_only(st->codecpar->codec_id))
|
||||||
|
Loading…
Reference in New Issue
Block a user