Skip to content

Commit

Permalink
fix autoselect for forced subs
Browse files Browse the repository at this point in the history
  • Loading branch information
shugli committed Apr 7, 2022
1 parent 6615847 commit 90603e1
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 @@ -969,7 +969,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_AUDIO)
Expand Down

0 comments on commit 90603e1

Please sign in to comment.