summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2016-08-06 16:15:33 +0100
committerSebastian Dröge <sebastian@centricular.com>2016-08-16 16:42:55 +0300
commitd8719fae14cf5e24359f5ff9e140229a0710daaf (patch)
tree38de58810999c3d405bc7863274ee9ceb2651135
parent91dd605ab7326f5b7fa4fde27c6c5d1604d6e470 (diff)
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
-rw-r--r--gst/dvdspu/gstdvdspu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gst/dvdspu/gstdvdspu.c b/gst/dvdspu/gstdvdspu.c
index 04a438713..84f5ba833 100644
--- a/gst/dvdspu/gstdvdspu.c
+++ b/gst/dvdspu/gstdvdspu.c
@@ -665,7 +665,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: