Skip to content

Commit 402427b

Browse files
committed
Mention the new supported targets
1 parent b4caac5 commit 402427b

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/main.c

+18
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,25 @@ int main(int argc, argv_t* argv[]) {
795795
that variant stream.
796796
*/
797797
if (selected_medias.offset == 0 && !disable_autoselect) {
798+
const size_t offset = selected_streams.offset;
798799

800+
for (index = 0; index < offset; index++) {
801+
const struct M3U8Stream* const resource = selected_streams.items[index];
802+
const struct M3U8StreamItem* const item = m3u8stream_finditem(&stream, resource);
803+
const struct M3U8VariantStream* const variant_stream = item->item;
804+
805+
if (variant_stream->audio != NULL) {
806+
selected_streams.items[selected_streams.offset++] = &variant_stream->audio->stream;
807+
}
808+
809+
if (variant_stream->video != NULL) {
810+
selected_streams.items[selected_streams.offset++] = &variant_stream->video->stream;
811+
}
812+
813+
if (variant_stream->subtitles != NULL) {
814+
selected_streams.items[selected_streams.offset++] = &variant_stream->subtitles->stream;
815+
}
816+
}
799817
}
800818
}
801819

0 commit comments

Comments
 (0)