Skip to content

Commit

Permalink
handle dav1 non-backwward compatible mode and add the dby1 compatible…
Browse files Browse the repository at this point in the history
… brands for P10.x as well
  • Loading branch information
cosmin committed May 8, 2024
1 parent 5762215 commit e6c3c69
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packager/media/formats/mp4/mp4_media_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ bool UpdateCodecStringForDolbyVision(
switch (actual_format) {
case FOURCC_dvh1:
case FOURCC_dvhe:
case FOURCC_dav1:
// Non-Backward compatibility mode. Replace the code string with
// Dolby Vision only.
*codec_string = dovi_config.GetCodecString(actual_format);
Expand Down Expand Up @@ -202,6 +203,7 @@ bool UpdateDolbyVisionInfo(FourCC actual_format,
switch (actual_format) {
case FOURCC_dvh1:
case FOURCC_dvhe:
case FOURCC_dav1:
// Non-Backward compatibility mode. Replace the code string with
// Dolby Vision only.
*codec_string = dovi_config.GetCodecString(actual_format);
Expand Down
4 changes: 3 additions & 1 deletion packager/media/formats/mp4/mp4_muxer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,9 @@ Status MP4Muxer::DelayInitializeMuxer() {
static_cast<const VideoStreamInfo*>(streams()[0].get())
->supplemental_codec();
if (codec_string.find("dvh") != std::string::npos ||
supplemental_codec_string.find("dvh") != std::string::npos)
supplemental_codec_string.find("dvh") != std::string::npos ||
codec_string.find("dav1") != std::string::npos ||
supplemental_codec_string.find("dav1") != std::string::npos)
ftyp->compatible_brands.push_back(FOURCC_dby1);
FourCC extra_brand =
static_cast<const VideoStreamInfo*>(streams()[0].get())
Expand Down

0 comments on commit e6c3c69

Please sign in to comment.