summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: aab324c)
raw | patch | inline | side by side (parent: aab324c)
author | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | |
Wed, 27 Apr 2011 13:14:00 +0000 (15:14 +0200) | ||
committer | Nikhil Devshatwar <a0132237@ti.com> | |
Fri, 17 May 2013 09:40:29 +0000 (15:10 +0530) |
... e.g. following a seek, which otherwise confuses downstream demuxer
expecting only a flow of data packets at this time.
expecting only a flow of data packets at this time.
gst/asfdemux/gstrtpasfdepay.c | patch | blob | history |
index e53746fe52a2922a5f7262105e9dab38fa01d48b..08cfe4471e76547fabff4e3a42bdfb541113ff29 100644 (file)
if (ps_string == NULL || *ps_string == '\0')
goto no_packetsize;
- depay->packet_size = atoi (ps_string);
+ if (depay->packet_size) {
+ /* header sent again following seek;
+ * discard to avoid confusing upstream */
+ if (depay->packet_size == atoi (ps_string)) {
+ goto duplicate_header;
+ } else {
+ /* since we should fiddle with downstream state to handle this */
+ goto refuse_renegotiation;
+ }
+ } else
+ depay->packet_size = atoi (ps_string);
if (depay->packet_size <= 16)
goto invalid_packetsize;
g_free (headers);
return FALSE;
}
+duplicate_header:
+ {
+ GST_DEBUG_OBJECT (depayload, "discarding duplicate header");
+ return TRUE;
+ }
+refuse_renegotiation:
+ {
+ GST_WARNING_OBJECT (depayload, "cannot renegotiate to different header");
+ return FALSE;
+ }
}
static gint