From b94755e4633045be96ab5e0bdde0db7e16a804bd Mon Sep 17 00:00:00 2001 From: "liberato@chromium.org" Date: Fri, 6 Aug 2021 04:25:31 +0000 Subject: [PATCH] FFmpeg M94 roll. Contains DEPS update + chromium-side fixes. Bug: 1227259 Change-Id: I61c5eaa789ea12c17d0cbcbf837435b9cf32479b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3011889 Reviewed-by: Thomas Guilbert Commit-Queue: Frank Liberato Cr-Commit-Position: refs/heads/master@{#909174} --- media/ffmpeg/ffmpeg_common.h | 1 + media/filters/ffmpeg_demuxer.cc | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/media/ffmpeg/ffmpeg_common.h b/media/ffmpeg/ffmpeg_common.h index cede8ac5a7..97d6307e28 100644 --- a/media/ffmpeg/ffmpeg_common.h +++ b/media/ffmpeg/ffmpeg_common.h @@ -29,6 +29,7 @@ extern "C" { #include #include #include +#include #include #include #include diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc index ac4713b072..605001d935 100644 --- a/media/filters/ffmpeg_demuxer.cc +++ b/media/filters/ffmpeg_demuxer.cc @@ -106,12 +106,12 @@ static base::TimeDelta ExtractStartTime(AVStream* stream) { // Next try to use the first DTS value, for codecs where we know PTS == DTS // (excludes all H26x codecs). The start time must be returned in PTS. - if (stream->first_dts != kNoFFmpegTimestamp && + if (av_stream_get_first_dts(stream) != kNoFFmpegTimestamp && stream->codecpar->codec_id != AV_CODEC_ID_HEVC && stream->codecpar->codec_id != AV_CODEC_ID_H264 && stream->codecpar->codec_id != AV_CODEC_ID_MPEG4) { const base::TimeDelta first_pts = - ConvertFromTimeBase(stream->time_base, stream->first_dts); + ConvertFromTimeBase(stream->time_base, av_stream_get_first_dts(stream)); if (first_pts < start_time) start_time = first_pts; }