2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Allow showing stories in different contexts.

This commit is contained in:
John Preston
2023-06-05 16:10:34 +04:00
parent e7c0385aea
commit b71d72ca7c
21 changed files with 231 additions and 112 deletions

View File

@@ -230,6 +230,7 @@ FormatPointer MakeFormatPointer(
if (!io) {
return {};
}
io->seekable = (seek != nullptr);
auto result = avformat_alloc_context();
if (!result) {
LogError(u"avformat_alloc_context"_q);
@@ -250,7 +251,9 @@ FormatPointer MakeFormatPointer(
LogError(u"avformat_open_input"_q, error);
return {};
}
result->flags |= AVFMT_FLAG_FAST_SEEK;
if (seek) {
result->flags |= AVFMT_FLAG_FAST_SEEK;
}
// Now FormatPointer will own and free the IO context.
io.release();