Index: media/filters/ffmpeg_demuxer.cc |
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc |
index e23116f55fedc8d537a3ea7e69b01dc6211f5aa7..afc9fc5c0c615344c6f2f77780113ba068ec75b2 100644 |
--- a/media/filters/ffmpeg_demuxer.cc |
+++ b/media/filters/ffmpeg_demuxer.cc |
@@ -278,8 +278,14 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) { |
buffer->set_decrypt_config(decrypt_config.Pass()); |
} |
- buffer->set_duration( |
- ConvertStreamTimestamp(stream_->time_base, packet->duration)); |
+ if (packet->duration >= 0) { |
+ buffer->set_duration( |
+ ConvertStreamTimestamp(stream_->time_base, packet->duration)); |
+ } else { |
+ DVLOG(1) << "FFmpeg returned a buffer with a negative duration! " |
acolwell GONE FROM CHROMIUM
2014/07/16 18:17:46
Filed https://code.google.com/p/chromium/issues/de
wolenetz
2014/07/16 19:51:03
nit: That bug is irksome. Please add a TODO(wolene
acolwell GONE FROM CHROMIUM
2014/07/16 19:54:55
Done.
|
+ << packet->duration; |
+ buffer->set_duration(kNoTimestamp()); |
+ } |
// Note: If pts is AV_NOPTS_VALUE, stream_timestamp will be kNoTimestamp(). |
const base::TimeDelta stream_timestamp = |