[FFmpeg-cvslog] fftools/ffmpeg_demux: don't flag timestamps as unreliable if they are generated
James Almer
git at videolan.org
Thu Jul 10 17:20:09 EEST 2025
ffmpeg | branch: release/6.1 | James Almer <jamrial at gmail.com> | Wed Jul 9 16:45:05 2025 -0300| [78690eba61ccb0c06ca869acb899128c84178250] | committer: James Almer
fftools/ffmpeg_demux: don't flag timestamps as unreliable if they are generated
Regardless of the source being an AVFMT_NOTIMESTAMPS format, if the timestamps
are generated like when using the use_wallclock_as_timestamps demuxer option,
then they are reliable.
Fixes ticket #11268
Signed-off-by: James Almer <jamrial at gmail.com>
(cherry picked from commit 1787fade209b1ecbd4b911c9d77a52bcdec13fa6)
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=78690eba61ccb0c06ca869acb899128c84178250
---
fftools/ffmpeg_demux.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c
index 350f233ab7..1ca40eda5a 100644
--- a/fftools/ffmpeg_demux.c
+++ b/fftools/ffmpeg_demux.c
@@ -1363,6 +1363,8 @@ int ifile_open(const OptionsContext *o, const char *filename)
char * data_codec_name = NULL;
int scan_all_pmts_set = 0;
+ int64_t use_wallclock_as_timestamps;
+
int64_t start_time = o->start_time;
int64_t start_time_eof = o->start_time_eof;
int64_t stop_time = o->stop_time;
@@ -1595,6 +1597,12 @@ int ifile_open(const OptionsContext *o, const char *filename)
d->nb_streams_warn = ic->nb_streams;
f->format_nots = !!(ic->iformat->flags & AVFMT_NOTIMESTAMPS);
+ ret = av_opt_get_int(ic, "use_wallclock_as_timestamps", 0, &use_wallclock_as_timestamps);
+ if (ret < 0)
+ return ret;
+
+ if (use_wallclock_as_timestamps)
+ f->format_nots = 0;
f->readrate = o->readrate ? o->readrate : 0.0;
if (f->readrate < 0.0f) {
More information about the ffmpeg-cvslog
mailing list