mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 15:48:23 +00:00
vrawpay: Error out cleanly if mapping the video frame fails
Instead of later dereferencing NULL and crashing.
This commit is contained in:
parent
91f5b4eaa2
commit
d0f608f60b
1 changed files with 4 additions and 1 deletions
|
@ -284,7 +284,10 @@ gst_rtp_vraw_pay_handle_buffer (GstRTPBasePayload * payload, GstBuffer * buffer)
|
||||||
|
|
||||||
rtpvrawpay = GST_RTP_VRAW_PAY (payload);
|
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);
|
||||||
|
return GST_FLOW_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
GST_LOG_OBJECT (rtpvrawpay, "new frame of %" G_GSIZE_FORMAT " bytes",
|
GST_LOG_OBJECT (rtpvrawpay, "new frame of %" G_GSIZE_FORMAT " bytes",
|
||||||
gst_buffer_get_size (buffer));
|
gst_buffer_get_size (buffer));
|
||||||
|
|
Loading…
Reference in a new issue