summaryrefslogtreecommitdiffstats
path: root/gst/rtp
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2009-05-12 18:39:28 +0200
committerWim Taymans <wim.taymans@collabora.co.uk>2009-05-25 10:59:17 +0200
commite13e3c624924745b1ff75a84f5e4016ce1dca0db (patch)
tree92c186403534ab77afff0e6643f425e94eaf3b23 /gst/rtp
parent301fc8a712273e16eabd3647ccf6a43a871e3ada (diff)
rtpmp4vpay: don't look for headers in some cases
In some streams (starting with 00000100) don't look for the headers but push data as it is. Fixes #582153
Diffstat (limited to 'gst/rtp')
-rw-r--r--gst/rtp/gstrtpmp4vpay.c7
-rw-r--r--gst/rtp/gstrtpmp4vpay.h1
2 files changed, 7 insertions, 1 deletions
diff --git a/gst/rtp/gstrtpmp4vpay.c b/gst/rtp/gstrtpmp4vpay.c
index 4e100ed8..31c44836 100644
--- a/gst/rtp/gstrtpmp4vpay.c
+++ b/gst/rtp/gstrtpmp4vpay.c
@@ -164,6 +164,7 @@ gst_rtp_mp4v_pay_init (GstRtpMP4VPay * rtpmp4vpay)
rtpmp4vpay->rate = 90000;
rtpmp4vpay->profile = 1;
rtpmp4vpay->send_config = DEFAULT_SEND_CONFIG;
+ rtpmp4vpay->need_config = TRUE;
rtpmp4vpay->config = NULL;
@@ -281,7 +282,7 @@ gst_rtp_mp4v_pay_flush (GstRtpMP4VPay * rtpmp4vpay)
* over multiple packets. */
avail = gst_adapter_available (rtpmp4vpay->adapter);
- if (rtpmp4vpay->config == NULL) {
+ if (rtpmp4vpay->config == NULL && rtpmp4vpay->need_config) {
/* when we don't have a config yet, flush things out */
gst_adapter_flush (rtpmp4vpay->adapter, avail);
avail = 0;
@@ -402,6 +403,10 @@ gst_rtp_mp4v_pay_depay_data (GstRtpMP4VPay * enc, guint8 * data, guint size,
/* VOP startcode, we don't have to flush the packet */
result = FALSE;
break;
+ case 0x00000100:
+ enc->need_config = FALSE;
+ result = TRUE;
+ break;
default:
if (code >= 0x20 && code <= 0x2f) {
GST_DEBUG_OBJECT (enc, "short header");
diff --git a/gst/rtp/gstrtpmp4vpay.h b/gst/rtp/gstrtpmp4vpay.h
index bdb82228..8ba6b320 100644
--- a/gst/rtp/gstrtpmp4vpay.h
+++ b/gst/rtp/gstrtpmp4vpay.h
@@ -52,6 +52,7 @@ struct _GstRtpMP4VPay
gint profile;
GstBuffer *config;
gboolean send_config;
+ gboolean need_config;
GstPadEventFunction old_event_func;
};