summaryrefslogtreecommitdiffstats
path: root/gst/qtdemux/gstrtpxqtdepay.c
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2007-09-26 14:26:39 +0000
committerWim Taymans <wim.taymans@gmail.com>2007-09-26 14:26:39 +0000
commit23eeb89a1647f98d8b0901aa395e92bf04e3b174 (patch)
tree54c73c2df622057cd76a8cb25a04e06a08268458 /gst/qtdemux/gstrtpxqtdepay.c
parent56ff7ee1ae31ca1647ce44c6c3364e257b747e6f (diff)
gst/qtdemux/gstrtpxqtdepay.*: Fail if we don't know the quicktime format.
Original commit message from CVS: * gst/qtdemux/gstrtpxqtdepay.c: (gst_rtp_xqt_depay_process), (gst_rtp_xqt_depay_change_state): * gst/qtdemux/gstrtpxqtdepay.h: Fail if we don't know the quicktime format.
Diffstat (limited to 'gst/qtdemux/gstrtpxqtdepay.c')
-rw-r--r--gst/qtdemux/gstrtpxqtdepay.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/gst/qtdemux/gstrtpxqtdepay.c b/gst/qtdemux/gstrtpxqtdepay.c
index 0a147ef4..4cd9257f 100644
--- a/gst/qtdemux/gstrtpxqtdepay.c
+++ b/gst/qtdemux/gstrtpxqtdepay.c
@@ -282,6 +282,7 @@ gst_rtp_xqt_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
/* discont, clear adapter and try to find a new packet start */
gst_adapter_clear (rtpxqtdepay->adapter);
rtpxqtdepay->need_resync = TRUE;
+ GST_DEBUG_OBJECT (rtpxqtdepay, "we need resync");
}
m = gst_rtp_buffer_get_marker (buf);
@@ -435,7 +436,9 @@ gst_rtp_xqt_depay_process (GstBaseRTPDepayload * depayload, GstBuffer * buf)
switch (tlv_type) {
case TLV_sd:
/* Session description */
- gst_rtp_quicktime_parse_sd (rtpxqtdepay, payload, tlv_len);
+ if (!gst_rtp_quicktime_parse_sd (rtpxqtdepay, payload, tlv_len))
+ goto unknown_format;
+ rtpxqtdepay->have_sd = TRUE;
break;
case TLV_qt:
case TLV_ti:
@@ -665,6 +668,12 @@ wrong_length:
("Wrong payload length."), (NULL));
return NULL;
}
+unknown_format:
+ {
+ GST_ELEMENT_WARNING (rtpxqtdepay, STREAM, DECODE,
+ ("Unknown payload format."), (NULL));
+ return NULL;
+ }
}
static void
@@ -710,7 +719,8 @@ gst_rtp_xqt_depay_change_state (GstElement * element, GstStateChange transition)
gst_adapter_clear (rtpxqtdepay->adapter);
rtpxqtdepay->previous_id = -1;
rtpxqtdepay->current_id = -1;
- rtpxqtdepay->need_resync = FALSE;
+ rtpxqtdepay->need_resync = TRUE;
+ rtpxqtdepay->have_sd = FALSE;
break;
default:
break;