summaryrefslogtreecommitdiff
path: root/src/codec
diff options
context:
space:
mode:
Diffstat (limited to 'src/codec')
-rw-r--r--src/codec/codec.h2
-rw-r--r--src/codec/codecs.c3
-rw-r--r--src/codec/ffmpeg/decoder.c3
-rw-r--r--src/codec/ffmpeg/meson.build2
4 files changed, 5 insertions, 5 deletions
diff --git a/src/codec/codec.h b/src/codec/codec.h
index f32283e..6a9b654 100644
--- a/src/codec/codec.h
+++ b/src/codec/codec.h
@@ -428,7 +428,7 @@ static inline s32 camu_guess_format(str *short_name, str *ext, str *mime_type)
(short_name && al_str_eq(short_name, &al_str_c("png"))) ||
(mime_type && al_str_eq(mime_type, &al_str_c("image/png")))) {
return CAMU_CODEC_PNG;
- } else if ((ext && (al_str_eq(ext, &al_str_c(".jpeg")) || al_str_eq(ext, &al_str_c(".jpg")))) ||
+ } else if ((ext && (al_str_eq(ext, &al_str_c(".jpeg")) || al_str_eq(ext, &al_str_c(".jpg")) || al_str_eq(ext, &al_str_c(".jpe")) || al_str_eq(ext, &al_str_c(".jfif")))) ||
(short_name && al_str_eq(short_name, &al_str_c("jpeg"))) ||
(mime_type && al_str_eq(mime_type, &al_str_c("image/jpeg")))) {
return CAMU_CODEC_JPEG;
diff --git a/src/codec/codecs.c b/src/codec/codecs.c
index dbec693..a373daf 100644
--- a/src/codec/codecs.c
+++ b/src/codec/codecs.c
@@ -83,6 +83,9 @@ struct camu_codec_info *camu_codec_info_by_type(s32 type)
struct camu_codec_info *camu_codec_info_by_name(str *name)
{
+ if (al_str_eq(name, &al_str_c("pcm_s16le"))) {
+ return (struct camu_codec_info *)0xcdda;
+ }
for (u32 i = 0; i < ARRAY_SIZE(codec_information); i++) {
if (al_str_eq(&codec_information[i].name, name)) {
return &codec_information[i];
diff --git a/src/codec/ffmpeg/decoder.c b/src/codec/ffmpeg/decoder.c
index 645a88a..7d50bca 100644
--- a/src/codec/ffmpeg/decoder.c
+++ b/src/codec/ffmpeg/decoder.c
@@ -114,9 +114,6 @@ static enum AVPixelFormat get_hw_format(AVCodecContext *context, const enum AVPi
log_error("Failed to get %s HW surface format.", hwdevice_name);
// Remake AVCodecContext as a software decoder.
- // This might log an error like "Your platform doesn't support hardware accelerated AV1 decoding.".
- // Even though the problem is really a lack of any decoder hardware OR software.
- // This happens with wine + d3d11va. Maybe a build configuration issue or FFmpeg bug?
AVCodecParameters *codecpar = av->codecpar;
av->errored_hw_context = av->codec_context;
alloc_codec_context_internal(av, codec, codecpar);
diff --git a/src/codec/ffmpeg/meson.build b/src/codec/ffmpeg/meson.build
index 6482426..e34cc92 100644
--- a/src/codec/ffmpeg/meson.build
+++ b/src/codec/ffmpeg/meson.build
@@ -11,7 +11,7 @@ ffmpeg_server_deps = []
ffmpeg_client_src = [ffmpeg_src, 'decoder.c', 'resampler.c', 'scaler.c']
ffmpeg_client_deps = []
-ffmpeg_force_fallback = false
+ffmpeg_force_fallback = get_option('wrap_mode') == 'forcefallback'
foreach dep: ['ffmpeg', 'libavutil', 'libavformat', 'libavcodec', 'libavdevice', 'libswresample', 'libswscale']
if dep in get_option('force_fallback_for')
ffmpeg_force_fallback = true