[FFmpeg-cvslog] fftools/ffmpeg_demux: log discontinuity warnings to stream context

Anton Khirnov git at videolan.org
Sun May 28 11:52:48 EEST 2023


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Fri May 19 09:57:24 2023 +0200| [4e96a71626996c5f128655c472e3b98558023f33] | committer: Anton Khirnov

fftools/ffmpeg_demux: log discontinuity warnings to stream context

Allows simplifying the log message.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4e96a71626996c5f128655c472e3b98558023f33
---

 fftools/ffmpeg_demux.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c
index 828a1182f0..561b4b0002 100644
--- a/fftools/ffmpeg_demux.c
+++ b/fftools/ffmpeg_demux.c
@@ -248,12 +248,10 @@ static void ts_discontinuity_detect(Demuxer *d, InputStream *ist,
             if (FFABS(delta) > 1LL * dts_delta_threshold * AV_TIME_BASE ||
                 pkt_dts + AV_TIME_BASE/10 < ds->dts) {
                 d->ts_offset_discont -= delta;
-                av_log(NULL, AV_LOG_WARNING,
-                       "timestamp discontinuity for stream #%d:%d "
-                       "(id=%d, type=%s): %"PRId64", new offset= %"PRId64"\n",
-                       ist->file_index, ist->st->index, ist->st->id,
-                       av_get_media_type_string(ist->par->codec_type),
-                       delta, d->ts_offset_discont);
+                av_log(ist, AV_LOG_WARNING,
+                       "timestamp discontinuity "
+                       "(stream id=%d): %"PRId64", new offset= %"PRId64"\n",
+                       ist->st->id, delta, d->ts_offset_discont);
                 pkt->dts -= av_rescale_q(delta, AV_TIME_BASE_Q, pkt->time_base);
                 if (pkt->pts != AV_NOPTS_VALUE)
                     pkt->pts -= av_rescale_q(delta, AV_TIME_BASE_Q, pkt->time_base);



More information about the ffmpeg-cvslog mailing list