From f991e09319d55f35f19b486e3094992224ddf4c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sat, 6 Aug 2016 16:15:33 +0100 Subject: [PATCH] dvdspu: don't crash if video frame could not be mapped As might happen with e.g. vaapi and the test file from https://bugzilla.gnome.org/show_bug.cgi?id=736227 --- gst/dvdspu/gstdvdspu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gst/dvdspu/gstdvdspu.c b/gst/dvdspu/gstdvdspu.c index 52d1038442..fb21748904 100644 --- a/gst/dvdspu/gstdvdspu.c +++ b/gst/dvdspu/gstdvdspu.c @@ -664,7 +664,9 @@ gstspu_render (GstDVDSpu * dvdspu, GstBuffer * buf) { GstVideoFrame frame; - gst_video_frame_map (&frame, &dvdspu->spu_state.info, buf, GST_MAP_READWRITE); + if (!gst_video_frame_map (&frame, &dvdspu->spu_state.info, buf, + GST_MAP_READWRITE)) + return; switch (dvdspu->spu_input_type) { case SPU_INPUT_TYPE_VOBSUB: