Skip to content

Commit

Permalink
Remove restriction on sample duration to be 0 for mp4
Browse files Browse the repository at this point in the history
0 sample duration is seen occasionally in the contents in the wild.

Closes #127

Change-Id: I48b9fac4add79f39a83fc571502bedb9f0be71df
  • Loading branch information
kqyang committed Jul 19, 2016
1 parent fae7874 commit 2cdd54b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packager/media/formats/mp4/fragmenter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@ Fragmenter::~Fragmenter() {}

Status Fragmenter::AddSample(scoped_refptr<MediaSample> 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());
Expand Down

0 comments on commit 2cdd54b

Please sign in to comment.