8d13862a00
The audio input and output issues have been resolved. News: https://www.openshot.org/blog/2026/04/06/openshot-351-faster-performance-smoother-editing-better-previews/ Changelog: https://github.com/OpenShot/libopenshot/releases/tag/v0.7.0 PR: 294379 Sponsored by: UNIS Labs MFH: 2026Q2
36 lines
1.2 KiB
C++
36 lines
1.2 KiB
C++
--- src/FFmpegReader.cpp.orig 2026-04-02 23:34:37 UTC
|
|
+++ src/FFmpegReader.cpp
|
|
@@ -170,7 +170,7 @@ static enum AVPixelFormat get_hw_dec_format(AVCodecCon
|
|
|
|
for (p = pix_fmts; *p != AV_PIX_FMT_NONE; p++) {
|
|
switch (*p) {
|
|
-#if defined(__linux__)
|
|
+#if defined(__unix__)
|
|
// Linux pix formats
|
|
case AV_PIX_FMT_VAAPI:
|
|
if (selected == 1) {
|
|
@@ -357,7 +357,7 @@ void FFmpegReader::Open() {
|
|
pCodecCtx->get_format = get_hw_dec_format;
|
|
|
|
if (adapter_num < 3 && adapter_num >=0) {
|
|
-#if defined(__linux__)
|
|
+#if defined(__unix__)
|
|
snprintf(adapter,sizeof(adapter),"/dev/dri/renderD%d", adapter_num+128);
|
|
adapter_ptr = adapter;
|
|
i_decoder_hw = openshot::Settings::Instance()->HARDWARE_DECODER;
|
|
@@ -420,11 +420,13 @@ void FFmpegReader::Open() {
|
|
}
|
|
|
|
// Check if it is there and writable
|
|
-#if defined(__linux__)
|
|
+#if defined(__unix__)
|
|
if( adapter_ptr != NULL && access( adapter_ptr, W_OK ) == 0 ) {
|
|
#elif defined(_WIN32)
|
|
if( adapter_ptr != NULL ) {
|
|
#elif defined(__APPLE__)
|
|
+ if( adapter_ptr != NULL ) {
|
|
+#else
|
|
if( adapter_ptr != NULL ) {
|
|
#endif
|
|
ZmqLogger::Instance()->AppendDebugMethod("Decode Device present using device");
|