From 581cb1fc4dd414b2b012993885b8902e35506892 Mon Sep 17 00:00:00 2001 From: Thomas Inskip Date: Tue, 2 Jun 2015 12:11:23 -0700 Subject: [PATCH] Added sample_description_index to 'tfhd' box for DASH-IF IOP compatiblity. Change-Id: I1bb24f3b3f258625ce6958d6510aab49bedbf719 --- packager/media/formats/mp4/fragmenter.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packager/media/formats/mp4/fragmenter.cc b/packager/media/formats/mp4/fragmenter.cc index 531660106f..fccdec7d31 100644 --- a/packager/media/formats/mp4/fragmenter.cc +++ b/packager/media/formats/mp4/fragmenter.cc @@ -77,7 +77,9 @@ Status Fragmenter::InitializeFragment(int64_t first_sample_dts) { traf_->runs.clear(); traf_->runs.resize(1); traf_->runs[0].flags = TrackFragmentRun::kDataOffsetPresentMask; - traf_->header.flags = TrackFragmentHeader::kDefaultBaseIsMoofMask; + traf_->header.sample_description_index = 1; // 1-based. + traf_->header.flags = TrackFragmentHeader::kDefaultBaseIsMoofMask | + TrackFragmentHeader::kSampleDescriptionIndexPresentMask; fragment_duration_ = 0; earliest_presentation_time_ = kInvalidTime; first_sap_time_ = kInvalidTime;