summaryrefslogtreecommitdiff
path: root/gst/rtp/gstrtpmp2tdepay.c
diff options
context:
space:
mode:
authorJose Antonio Santos Cadenas <santoscadenas@gmail.com>2011-05-18 12:36:40 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2011-05-18 15:25:24 +0200
commit9d322436711d6769d7ec7b0917a7b038e3591d7a (patch)
tree6f2a4b95d9e7c5ca558c9bb1eca269e375d174fa /gst/rtp/gstrtpmp2tdepay.c
parent23ecab67d62ab6627d460a704a6e147005cd0332 (diff)
rtp: Fix segmentation fault processing payload buffers
This commit checks if the value returned by gst_rtp_buffer_get_payload_buffer and gst_rtp_buffer_get_payload_subbuffer is NULL before using it.
Diffstat (limited to 'gst/rtp/gstrtpmp2tdepay.c')
-rw-r--r--gst/rtp/gstrtpmp2tdepay.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gst/rtp/gstrtpmp2tdepay.c b/gst/rtp/gstrtpmp2tdepay.c
index fe6c5dee2..4f5e7202e 100644
--- a/gst/rtp/gstrtpmp2tdepay.c
+++ b/gst/rtp/gstrtpmp2tdepay.c
@@ -169,8 +169,9 @@ gst_rtp_mp2t_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
gst_rtp_buffer_get_payload_subbuffer (buf, rtpmp2tdepay->skip_first_bytes,
-1);
- GST_DEBUG ("gst_rtp_mp2t_depay_chain: pushing buffer of size %d",
- GST_BUFFER_SIZE (outbuf));
+ if (outbuf)
+ GST_DEBUG ("gst_rtp_mp2t_depay_chain: pushing buffer of size %d",
+ GST_BUFFER_SIZE (outbuf));
return outbuf;