summaryrefslogtreecommitdiff
path: root/multimedia/sunshine/files/patch-src_video.cpp
blob: e79e6647b94db4e8e39f818df2d24a202c5c06c3 (plain) (blame)
1
2
3
4
5
6
7
8
9
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());