Commit 6416cf38 authored by Ted Meyer's avatar Ted Meyer Committed by Commit Bot

Dont drop packet when last_dts_ is invalid

If the previous packet position and the current match and we fall back
to comparing display timestamps, make sure that we don't drop packets
which never had a display timestamp set.

Bug: 894776
Change-Id: I5033462642255743cb05cd44ec85312441503f53
Reviewed-on: https://chromium-review.googlesource.com/c/1356310Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Commit-Queue: Ted Meyer <tmathmeyer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612745}
parent 15ea3c47
......@@ -391,8 +391,8 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
<< " < " << last_packet_pos_ << ")";
return;
}
if (packet->pos == last_packet_pos_ && packet_dts <= last_packet_dts_) {
DCHECK_NE(last_packet_dts_, AV_NOPTS_VALUE);
if (last_packet_dts_ != AV_NOPTS_VALUE && packet->pos == last_packet_pos_ &&
packet_dts <= last_packet_dts_) {
DVLOG(3) << "Dropped packet with out of order display timestamp ("
<< packet_dts << " < " << last_packet_dts_ << ")";
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment