summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2009-07-28 18:18:20 +0200
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2009-08-11 02:30:47 +0100
commit9f68303a2e290c14c91deb5ec33abe885980010e (patch)
treec561b77800607b1f13c7176640a738879a1d1d6f
parente37844fdc7753fd41089f16c0b4cdc88f182bf68 (diff)
rtpsource: allow for NULL caps on buffers
Add the NULL caps check where it matters and also cover another case of potential NULL caps. Fixes #590030
-rw-r--r--gst/rtpmanager/rtpsource.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gst/rtpmanager/rtpsource.c b/gst/rtpmanager/rtpsource.c
index 77d56c227..1e0b6c0de 100644
--- a/gst/rtpmanager/rtpsource.c
+++ b/gst/rtpmanager/rtpsource.c
@@ -628,7 +628,7 @@ rtp_source_update_caps (RTPSource * src, GstCaps * caps)
gint ival;
/* nothing changed, return */
- if (src->caps == caps)
+ if (caps == NULL || src->caps == caps)
return;
s = gst_caps_get_structure (caps, 0);
@@ -981,8 +981,7 @@ rtp_source_process_rtp (RTPSource * src, GstBuffer * buffer,
seqnr = gst_rtp_buffer_get_seq (buffer);
- if (GST_BUFFER_CAPS (buffer))
- rtp_source_update_caps (src, GST_BUFFER_CAPS (buffer));
+ rtp_source_update_caps (src, GST_BUFFER_CAPS (buffer));
if (stats->cycles == -1) {
GST_DEBUG ("received first buffer");