From a73c15ae163d0037de67bd15692685842c8428c3 Mon Sep 17 00:00:00 2001 From: John Bradley Date: Tue, 10 Mar 2015 14:33:21 -0500 Subject: [PATCH] obs-ffmpeg: Fix bug where update_sws_context result not checked --- plugins/obs-ffmpeg/obs-ffmpeg-source.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/obs-ffmpeg/obs-ffmpeg-source.c b/plugins/obs-ffmpeg/obs-ffmpeg-source.c index 2341ab2ab..5398e5850 100644 --- a/plugins/obs-ffmpeg/obs-ffmpeg-source.c +++ b/plugins/obs-ffmpeg/obs-ffmpeg-source.c @@ -127,7 +127,8 @@ static bool video_frame_scale(struct ff_frame *frame, uint8_t *picture_data = malloc(linesize * frame->frame->height); - update_sws_context(s, frame->frame); + if (!update_sws_context(s, frame->frame)) + return false; sws_scale( s->sws_ctx,