aboutsummaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2025-02-22 01:05:29 +0100
committerdec05eba <dec05eba@protonmail.com>2025-02-22 01:05:29 +0100
commit000da7d64044c4ea2a1679c2864252fee9895d48 (patch)
treedadeb51a2c1aeab844cbe5eb074a926905eff6d4 /src/utils.c
parentfe4cd2bb0e244c568b24ed1c39a19497c41cb2f9 (diff)
Make image output lossy (use stb image writer), also significantly improves performance for jpeg
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/utils.c b/src/utils.c
index 61ca856..82c51b5 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -635,9 +635,12 @@ static VADisplay video_codec_context_get_vaapi_display(AVCodecContext *video_cod
}
bool video_codec_context_is_vaapi(AVCodecContext *video_codec_context) {
+ if(!video_codec_context)
+ return false;
+
AVBufferRef *hw_frames_ctx = video_codec_context->hw_frames_ctx;
if(!hw_frames_ctx)
- return NULL;
+ return false;
AVHWFramesContext *hw_frame_context = (AVHWFramesContext*)hw_frames_ctx->data;
AVHWDeviceContext *device_context = (AVHWDeviceContext*)hw_frame_context->device_ctx;