Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Unified Diff: media/filters/ffmpeg_demuxer.cc

Issue 2792193002: Ignore start time values matching kNoTimestamp. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_demuxer.cc
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
index e0abd230f12f91c5e57212c981f06c780086a630..c686aa9de4c933cbde609efbce9d3c2891c8e694 100644
--- a/media/filters/ffmpeg_demuxer.cc
+++ b/media/filters/ffmpeg_demuxer.cc
@@ -1235,8 +1235,13 @@ void FFmpegDemuxer::OnFindStreamInfoDone(const PipelineStatusCB& status_cb,
if (packet_buffer->pkt.pts != static_cast<int64_t>(AV_NOPTS_VALUE)) {
const base::TimeDelta packet_pts =
ConvertFromTimeBase(stream->time_base, packet_buffer->pkt.pts);
- if (packet_pts < start_time_estimates[stream->index])
+ // We ignore kNoTimestamp here since -int64_t::min() is possible; see
+ // https://crbug.com/700501. Technically this is a valid value, but in
+ // practice shouldn't occur, so just ignore it when estimating.
+ if (packet_pts != kNoTimestamp && packet_pts != kInfiniteDuration &&
+ packet_pts < start_time_estimates[stream->index]) {
start_time_estimates[stream->index] = packet_pts;
+ }
}
packet_buffer = packet_buffer->next;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698