From 0b3495b854b286a3c0e54b80148d9dbca6921b96 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 30 Dec 2018 00:32:51 +0100 Subject: [PATCH] Fix a crash on receiving dummy frames. --- nageru/mixer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nageru/mixer.cpp b/nageru/mixer.cpp index 23ad514..7ef2a4c 100644 --- a/nageru/mixer.cpp +++ b/nageru/mixer.cpp @@ -798,7 +798,7 @@ void Mixer::bm_frame(unsigned card_index, uint16_t timecode, size_t cbcr_width, cbcr_height, cbcr_offset, y_offset; size_t expected_length = video_format.stride * (video_format.height + video_format.extra_lines_top + video_format.extra_lines_bottom); - if (userdata->pixel_format == PixelFormat_8BitYCbCrPlanar) { + if (userdata != nullptr && userdata->pixel_format == PixelFormat_8BitYCbCrPlanar) { // The calculation above is wrong for planar Y'CbCr, so just override it. assert(card->type == CardType::FFMPEG_INPUT); assert(video_offset == 0); -- 2.39.2