summaryrefslogtreecommitdiff
path: root/multimedia/sunshine/files/patch-src_video.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/sunshine/files/patch-src_video.cpp')
-rw-r--r--multimedia/sunshine/files/patch-src_video.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/multimedia/sunshine/files/patch-src_video.cpp b/multimedia/sunshine/files/patch-src_video.cpp
new file mode 100644
index 0000000..e79e664
--- /dev/null
+++ b/multimedia/sunshine/files/patch-src_video.cpp
@@ -0,0 +1,10 @@
+--- src/video.cpp.orig
++++ src/video.cpp
+@@ -134,6 +134,7 @@
+ // Setup the input frame using the caller's img_t
+ sws_input_frame->data[0] = img.data;
+ sws_input_frame->linesize[0] = img.row_pitch;
++ if (!img.data) { return 0; }
+
+ // Perform color conversion and scaling to the final size
+ auto status = sws_scale_frame(sws.get(), requires_padding ? sws_output_frame.get() : sw_frame.get(), sws_input_frame.get());