mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Use threaded decoding in ffmpeg streaming.
This commit is contained in:
@@ -32,10 +32,6 @@ extern "C" {
|
||||
|
||||
#include <QtNetwork/QSslSocket>
|
||||
|
||||
#ifdef small
|
||||
#undef small
|
||||
#endif // small
|
||||
|
||||
uint64 _SharedMemoryLocation[4] = { 0x00, 0x01, 0x02, 0x03 };
|
||||
|
||||
// Base types compile-time check
|
||||
|
||||
@@ -175,6 +175,7 @@ CodecPointer MakeCodecPointer(not_null<AVStream*> stream) {
|
||||
return {};
|
||||
}
|
||||
av_codec_set_pkt_timebase(context, stream->time_base);
|
||||
av_opt_set(context, "threads", "auto", 0);
|
||||
av_opt_set_int(context, "refcounted_frames", 1, 0);
|
||||
|
||||
const auto codec = avcodec_find_decoder(context->codec_id);
|
||||
|
||||
@@ -83,6 +83,14 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#define __STDC_FORMAT_MACROS
|
||||
#endif // Q_OS_UNIX
|
||||
|
||||
// Remove 'small' macro definition.
|
||||
#ifdef Q_OS_WIN
|
||||
#include <rpc.h>
|
||||
#ifdef small
|
||||
#undef small
|
||||
#endif // small
|
||||
#endif // Q_OS_WIN
|
||||
|
||||
#include <array>
|
||||
#include <vector>
|
||||
#include <set>
|
||||
|
||||
+1
-1
Submodule Telegram/lib_base updated: 6a78e454e5...623439a33a
+1
-1
Submodule Telegram/lib_crl updated: 661ac4f6bd...bb8547bba7
Reference in New Issue
Block a user