Use threaded decoding in ffmpeg streaming.

This commit is contained in:
John Preston 2020-07-27 18:19:26 +04:00
parent e293a26029
commit 361b99b0c9
5 changed files with 11 additions and 6 deletions

View file

@ -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

View file

@ -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);

View file

@ -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 @@
Subproject commit 6a78e454e5bd61133b3d6c9f8d64fbad00f17618
Subproject commit 623439a33a4c3e70251d62566f064c812e545980

@ -1 +1 @@
Subproject commit 661ac4f6bdf8991e7d6cac176d32338ac025b637
Subproject commit bb8547bba703e53ab46cd6cd009c48adabaa1823