Skip to content

Commit

Permalink
Merge pull request #1328 from CastagnaIT/fix_hls_media_manifest
Browse files Browse the repository at this point in the history
[HLSTree] Fix missing codec for media playlist
  • Loading branch information
glennguy authored Jul 17, 2023
2 parents 5f64aa9 + 4091b72 commit 6974e00
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/parser/HLSTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -951,14 +951,18 @@ bool adaptive::CHLSTree::ParseManifest(const std::string& data)
}
else if (tagName == "#EXTINF")
{
// This is not a multi - bitrate playlist
// This is a media playlist (not a master playlist with multi-bitrate playlist)

//! @todo: here we are add some fake data, and we are downloading two times the same manifest
//! because the current parser code is splitted on two parts and managed from different code,
//! to solve this situation a rework is needed, where we can have a seletable parsing method
auto newAdpSet = CAdaptationSet::MakeUniquePtr(period.get());
newAdpSet->SetStreamType(StreamType::VIDEO);

auto repr = CRepresentation::MakeUniquePtr(newAdpSet.get());
repr->SetTimescale(1000000);
repr->SetSourceUrl(manifest_url_);
repr->AddCodecs(CODEC::FOURCC_H264);

repr->assured_buffer_duration_ = m_settings.m_bufferAssuredDuration;
repr->max_buffer_duration_ = m_settings.m_bufferMaxDuration;
Expand Down

0 comments on commit 6974e00

Please sign in to comment.