Skip to content

Commit

Permalink
Merge pull request #6 from SRGSSR/feature/fix_forced_subs_auto_select
Browse files Browse the repository at this point in the history
fix autoselect for forced subs
  • Loading branch information
shugli authored Apr 7, 2022
2 parents 8943506 + 90603e1 commit 19b9cf1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion vod/hls/m3u8_builder.c
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,14 @@ m3u8_builder_ext_x_media_tags_write(
}
else
{
p = vod_copy(p, M3U8_EXT_MEDIA_NON_DEFAULT, sizeof(M3U8_EXT_MEDIA_NON_DEFAULT) - 1);
if (tracks[media_type]->media_info.forced)
{
p = vod_copy(p, M3U8_EXT_MEDIA_AUTOSELECT, sizeof(M3U8_EXT_MEDIA_AUTOSELECT) - 1);
}
else
{
p = vod_copy(p, M3U8_EXT_MEDIA_NON_DEFAULT, sizeof(M3U8_EXT_MEDIA_NON_DEFAULT) - 1);
}
}

if (media_type == MEDIA_TYPE_SUBTITLE)
Expand Down

0 comments on commit 19b9cf1

Please sign in to comment.