From 2cdd54b6f7aeb3e2e66e9fde25594573a28b5f95 Mon Sep 17 00:00:00 2001 From: Kongqun Yang Date: Mon, 18 Jul 2016 11:37:19 -0700 Subject: [PATCH] Remove restriction on sample duration to be 0 for mp4 0 sample duration is seen occasionally in the contents in the wild. Closes #127 Change-Id: I48b9fac4add79f39a83fc571502bedb9f0be71df --- packager/media/formats/mp4/fragmenter.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packager/media/formats/mp4/fragmenter.cc b/packager/media/formats/mp4/fragmenter.cc index 5d170ab801..01718921b2 100644 --- a/packager/media/formats/mp4/fragmenter.cc +++ b/packager/media/formats/mp4/fragmenter.cc @@ -46,7 +46,10 @@ Fragmenter::~Fragmenter() {} Status Fragmenter::AddSample(scoped_refptr sample) { DCHECK(sample); - CHECK_GT(sample->duration(), 0); + if (sample->duration() == 0) { + LOG(WARNING) << "Unexpected sample with zero duration @ dts " + << sample->dts(); + } if (!fragment_initialized_) { Status status = InitializeFragment(sample->dts());