Commit d0f608f6 authored by Sebastian Dröge's avatar Sebastian Dröge
Browse files

vrawpay: Error out cleanly if mapping the video frame fails

Instead of later dereferencing NULL and crashing.
parent 91f5b4ea
......@@ -284,7 +284,10 @@ gst_rtp_vraw_pay_handle_buffer (GstRTPBasePayload * payload, GstBuffer * buffer)
rtpvrawpay = GST_RTP_VRAW_PAY (payload);
gst_video_frame_map (&frame, &rtpvrawpay->vinfo, buffer, GST_MAP_READ);
if (!gst_video_frame_map (&frame, &rtpvrawpay->vinfo, buffer, GST_MAP_READ)) {
gst_buffer_unref (buffer);
GST_LOG_OBJECT (rtpvrawpay, "new frame of %" G_GSIZE_FORMAT " bytes",
gst_buffer_get_size (buffer));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment