projects
/
platform
/
upstream
/
gst-plugins-good.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
91f5b4e
)
vrawpay: Error out cleanly if mapping the video frame fails
author
Sebastian Dröge
<sebastian@centricular.com>
Mon, 28 Nov 2016 07:30:25 +0000
(09:30 +0200)
committer
Sebastian Dröge
<sebastian@centricular.com>
Mon, 28 Nov 2016 07:30:25 +0000
(09:30 +0200)
Instead of later dereferencing NULL and crashing.
gst/rtp/gstrtpvrawpay.c
patch
|
blob
|
history
diff --git
a/gst/rtp/gstrtpvrawpay.c
b/gst/rtp/gstrtpvrawpay.c
index
1936743
..
9368936
100644
(file)
--- a/
gst/rtp/gstrtpvrawpay.c
+++ b/
gst/rtp/gstrtpvrawpay.c
@@
-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);
+ return GST_FLOW_ERROR;
+ }
GST_LOG_OBJECT (rtpvrawpay, "new frame of %" G_GSIZE_FORMAT " bytes",
gst_buffer_get_size (buffer));