summaryrefslogtreecommitdiffstats
path: root/gst/rtp/gstrtpdvdepay.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst/rtp/gstrtpdvdepay.c')
-rw-r--r--gst/rtp/gstrtpdvdepay.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/gst/rtp/gstrtpdvdepay.c b/gst/rtp/gstrtpdvdepay.c
index c61b20f6..978271fb 100644
--- a/gst/rtp/gstrtpdvdepay.c
+++ b/gst/rtp/gstrtpdvdepay.c
@@ -173,7 +173,7 @@ gst_rtp_dv_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
GstStructure *structure;
GstRTPDVDepay *rtpdvdepay;
GstCaps *srccaps;
- gint clock_rate = 90000; /* default */
+ gint clock_rate;
gboolean systemstream, ret;
const gchar *encode, *media;
@@ -181,8 +181,9 @@ gst_rtp_dv_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
structure = gst_caps_get_structure (caps, 0);
- if (gst_structure_has_field (structure, "clock-rate"))
- gst_structure_get_int (structure, "clock-rate", &clock_rate);
+ if (!gst_structure_get_int (structure, "clock-rate", &clock_rate))
+ clock_rate = 90000; /* default */
+ depayload->clock_rate = clock_rate;
/* we really need the encode property to figure out the frame size, it's also
* required by the spec */
@@ -230,9 +231,6 @@ gst_rtp_dv_depay_setcaps (GstBaseRTPDepayload * depayload, GstCaps * caps)
ret = gst_pad_set_caps (depayload->srcpad, srccaps);
gst_caps_unref (srccaps);
- depayload->clock_rate = clock_rate;
- rtpdvdepay->negotiated = TRUE;
-
return ret;
/* ERRORS */
@@ -307,9 +305,6 @@ gst_rtp_dv_depay_process (GstBaseRTPDepayload * base, GstBuffer * in)
GstRTPDVDepay *dvdepay = GST_RTP_DV_DEPAY (base);
gboolean marker;
- if (!dvdepay->negotiated)
- goto not_negotiated;
-
marker = gst_rtp_buffer_get_marker (in);
/* Check if the received packet contains (the start of) a new frame, we do
@@ -361,14 +356,6 @@ gst_rtp_dv_depay_process (GstBaseRTPDepayload * base, GstBuffer * in)
dvdepay->prev_ts = rtp_ts;
}
return out;
-
- /* ERRORS */
-not_negotiated:
- {
- GST_ELEMENT_ERROR (dvdepay, STREAM, NOT_IMPLEMENTED,
- (NULL), ("not negotiated"));
- return NULL;
- }
}
static void
@@ -381,7 +368,6 @@ gst_rtp_dv_depay_reset (GstRTPDVDepay * depay)
depay->prev_ts = -1;
depay->have_header = FALSE;
depay->frame_nr = 0;
- depay->negotiated = FALSE;
}
static GstStateChangeReturn