summaryrefslogtreecommitdiff
path: root/gst/rtp/gstrtpsv3vdepay.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst/rtp/gstrtpsv3vdepay.c')
-rw-r--r--gst/rtp/gstrtpsv3vdepay.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/gst/rtp/gstrtpsv3vdepay.c b/gst/rtp/gstrtpsv3vdepay.c
index b8e24925..f3c277b2 100644
--- a/gst/rtp/gstrtpsv3vdepay.c
+++ b/gst/rtp/gstrtpsv3vdepay.c
@@ -123,32 +123,27 @@ gst_rtp_sv3v_depay_finalize (GObject * object)
gboolean
gst_rtp_sv3v_depay_setcaps (GstBaseRTPDepayload * filter, GstCaps * caps)
{
-
GstStructure *structure = gst_caps_get_structure (caps, 0);
- gint clock_rate = 90000; // default
-
- if (gst_structure_has_field (structure, "clock-rate"))
- gst_structure_get_int (structure, "clock-rate", &clock_rate);
+ gint clock_rate;
+ if (!gst_structure_get_int (structure, "clock-rate", &clock_rate))
+ clock_rate = 90000; // default
filter->clock_rate = clock_rate;
+ /* will set caps later */
+
return TRUE;
}
-
static GstBuffer *
gst_rtp_sv3v_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
{
-
GstRtpSV3VDepay *rtpsv3vdepay;
GstBuffer *outbuf;
guint16 seq;
rtpsv3vdepay = GST_RTP_SV3V_DEPAY (depayload);
- if (!gst_rtp_buffer_validate (buf))
- goto bad_packet;
-
/* flush on sequence number gaps */
seq = gst_rtp_buffer_get_seq (buf);
if (seq != rtpsv3vdepay->nextseq) {
@@ -236,9 +231,6 @@ gst_rtp_sv3v_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
avail = gst_adapter_available (rtpsv3vdepay->adapter);
outbuf = gst_adapter_take_buffer (rtpsv3vdepay->adapter, avail);
- /* timestamp for complete buffer is that of last buffer as well */
- gst_buffer_set_caps (outbuf, GST_PAD_CAPS (depayload->srcpad));
-
return outbuf;
}
}
@@ -248,7 +240,7 @@ gst_rtp_sv3v_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
bad_packet:
{
GST_ELEMENT_WARNING (rtpsv3vdepay, STREAM, DECODE,
- ("Packet did not validate"), (NULL));
+ (NULL), ("Packet was too short"));
return NULL;
}
}