Lines 106-117
static base::TimeDelta ExtractStartTime(AVStream* stream) {
Link Here
|
106 |
|
106 |
|
107 |
// Next try to use the first DTS value, for codecs where we know PTS == DTS |
107 |
// Next try to use the first DTS value, for codecs where we know PTS == DTS |
108 |
// (excludes all H26x codecs). The start time must be returned in PTS. |
108 |
// (excludes all H26x codecs). The start time must be returned in PTS. |
109 |
if (stream->first_dts != kNoFFmpegTimestamp && |
109 |
if (av_stream_get_first_dts(stream) != kNoFFmpegTimestamp && |
110 |
stream->codecpar->codec_id != AV_CODEC_ID_HEVC && |
110 |
stream->codecpar->codec_id != AV_CODEC_ID_HEVC && |
111 |
stream->codecpar->codec_id != AV_CODEC_ID_H264 && |
111 |
stream->codecpar->codec_id != AV_CODEC_ID_H264 && |
112 |
stream->codecpar->codec_id != AV_CODEC_ID_MPEG4) { |
112 |
stream->codecpar->codec_id != AV_CODEC_ID_MPEG4) { |
113 |
const base::TimeDelta first_pts = |
113 |
const base::TimeDelta first_pts = |
114 |
ConvertFromTimeBase(stream->time_base, stream->first_dts); |
114 |
ConvertFromTimeBase(stream->time_base, av_stream_get_first_dts(stream)); |
115 |
if (first_pts < start_time) |
115 |
if (first_pts < start_time) |
116 |
start_time = first_pts; |
116 |
start_time = first_pts; |
117 |
} |
117 |
} |