[FFmpeg-cvslog] lavf/demux: treat streams with AVSTREAM_PARSE_FULL_RAW as having timestamps

Anton Khirnov git at videolan.org
Thu Apr 13 16:42:48 EEST 2023


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Wed Apr  5 16:35:22 2023 +0200| [7b827a029338ef8af689e84a352825797b286e26] | committer: Anton Khirnov

lavf/demux: treat streams with AVSTREAM_PARSE_FULL_RAW as having timestamps

In this case the timestamps are set by the parser.
Cf. a6b3471c44fd981d3b33ea9050f78a0bc9494c5e

Required by the following commit.

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

 libavformat/demux.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/demux.c b/libavformat/demux.c
index b19ab86d08..06de71cd6e 100644
--- a/libavformat/demux.c
+++ b/libavformat/demux.c
@@ -2569,7 +2569,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
                 extract_extradata_check(st))
                 break;
             if (sti->first_dts == AV_NOPTS_VALUE &&
-                !(ic->iformat->flags & AVFMT_NOTIMESTAMPS) &&
+                (!(ic->iformat->flags & AVFMT_NOTIMESTAMPS) || sti->need_parsing == AVSTREAM_PARSE_FULL_RAW) &&
                 sti->codec_info_nb_frames < ((st->disposition & AV_DISPOSITION_ATTACHED_PIC) ? 1 : ic->max_ts_probe) &&
                 (st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO ||
                  st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO))



More information about the ffmpeg-cvslog mailing list