Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libcam/libcam_encoder/encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ static encoder_video_context_t *encoder_video_init(encoder_context_t *encoder_ct

video_codec_data->codec_context = getLoadLibsInstance()->m_avcodec_alloc_context3(video_codec_data->codec);

getLoadLibsInstance()->m_avcodec_get_context_defaults3(
getLoadLibsInstance()->m_avcodec_get_context_defaults3 && getLoadLibsInstance()->m_avcodec_get_context_defaults3(
video_codec_data->codec_context,
video_codec_data->codec);

Expand Down Expand Up @@ -761,7 +761,7 @@ static encoder_audio_context_t *encoder_audio_init(encoder_context_t *encoder_ct
}

audio_codec_data->codec_context = getLoadLibsInstance()->m_avcodec_alloc_context3(audio_codec_data->codec);
getLoadLibsInstance()->m_avcodec_get_context_defaults3(audio_codec_data->codec_context, audio_codec_data->codec);
getLoadLibsInstance()->m_avcodec_get_context_defaults3 && getLoadLibsInstance()->m_avcodec_get_context_defaults3(audio_codec_data->codec_context, audio_codec_data->codec);

if (audio_codec_data->codec_context == NULL) {
fprintf(stderr, "ENCODER: FATAL memory allocation failure (encoder_audio_init): %s\n", strerror(errno));
Expand Down
2 changes: 1 addition & 1 deletion libcam/libcam_v4l2core/jpeg_decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -1415,7 +1415,7 @@ int jpeg_init_decoder(int width, int height)

#if LIBAVCODEC_VER_AT_LEAST(53,6)
codec_data->context = getLoadLibsInstance()->m_avcodec_alloc_context3(codec_data->codec);
getLoadLibsInstance()->m_avcodec_get_context_defaults3 (codec_data->context, codec_data->codec);
getLoadLibsInstance()->m_avcodec_get_context_defaults3 && getLoadLibsInstance()->m_avcodec_get_context_defaults3 (codec_data->context, codec_data->codec);
#else
codec_data->context = getLoadLibsInstance()->m_avcodec_alloc_context();
getLoadLibsInstance()->m_avcodec_get_context_defaults(codec_data->context);
Expand Down
5 changes: 5 additions & 0 deletions src/src/majorimageprocessingthread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ extern "C" {
#include <QFile>
#include <QDate>
#include <QDir>
#include <DSysInfo>
DCORE_USE_NAMESPACE

MajorImageProcessingThread::MajorImageProcessingThread():m_bHorizontalMirror(false)
{
Expand Down Expand Up @@ -250,6 +252,9 @@ void MajorImageProcessingThread::run()
#if defined(_loongarch) || defined(__loongarch__) || defined(__loongarch64) || defined (__mips__)
bUseRgb = true;
#endif
if(DSysInfo::majorVersion() == "23") {
bUseRgb = true;
}
if (get_wayland_status())
bUseRgb = true;

Expand Down