Index: media/filters/ffmpeg_demuxer.cc |
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc |
index 5f37c6eac83c2db9ea5408714e3a1d5c3c4bec89..e2a70731fe4c5e256cee22485f351b58bf0370ae 100644 |
--- a/media/filters/ffmpeg_demuxer.cc |
+++ b/media/filters/ffmpeg_demuxer.cc |
@@ -507,7 +507,8 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) { |
// Only allow negative timestamps past if we know they'll be fixed up by the |
// code paths below; otherwise they should be treated as a parse error. |
- if (!fixup_negative_timestamps_ && buffer->timestamp() < base::TimeDelta()) { |
+ if ((!fixup_negative_timestamps_ || last_packet_timestamp_ == kNoTimestamp) && |
+ buffer->timestamp() < base::TimeDelta()) { |
MEDIA_LOG(DEBUG, media_log_) |
<< "FFmpegDemuxer: unfixable negative timestamp"; |
demuxer_->NotifyDemuxerError(DEMUXER_ERROR_COULD_NOT_PARSE); |