Fix NV12 crash issue when recreate camera object
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "sys_inc.h"
|
||||
#include "media_format.h"
|
||||
#include <string>
|
||||
#include <atomic>
|
||||
#include <mutex>
|
||||
#include <vector>
|
||||
extern "C"
|
||||
@@ -152,7 +153,7 @@ private:
|
||||
int hwDecoderInit(AVCodecContext* ctx, int hwMode, int preferredGpu = -1);
|
||||
private:
|
||||
BOOL m_bInited;
|
||||
BOOL m_bRunning;
|
||||
std::atomic<BOOL> m_bRunning;
|
||||
BOOL m_bHardwareDecoderEnabled; // Track if hardware decoder is enabled
|
||||
bool m_bCudaHWAccel; // true when using AV_HWDEVICE_TYPE_CUDA
|
||||
int m_hwGpuIndex; // GPU index assigned by HWDecoderPool (-1 = legacy)
|
||||
|
||||
Reference in New Issue
Block a user