gst/gdp/gstgdpdepay.c: Check the body CRC (if set) when depayloading.

Original commit message from CVS:
* gst/gdp/gstgdpdepay.c: (gst_gdp_depay_chain):
Check the body CRC (if set) when depayloading.
Fixes #522401.
This commit is contained in:
Michael Smith 2008-03-27 15:26:38 +00:00
parent 4e87a5db29
commit 670d6cd1e4
2 changed files with 19 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2008-03-27 Michael Smith <msmith@fluendo.com>
* gst/gdp/gstgdpdepay.c: (gst_gdp_depay_chain):
Check the body CRC (if set) when depayloading.
Fixes #522401.
2008-03-24 Tim-Philipp Müller <tim at centricular dot net>
* ext/pango/gsttextoverlay.c: (gst_text_overlay_class_init):

View file

@ -287,6 +287,12 @@ gst_gdp_depay_chain (GstPad * pad, GstBuffer * buffer)
} else {
goto wrong_type;
}
if (!gst_dp_validate_payload (GST_DP_HEADER_LENGTH, this->header,
gst_adapter_peek (this->adapter, this->payload_length))) {
goto payload_validate_error;
}
break;
}
case GST_GDP_DEPAY_STATE_BUFFER:
@ -392,6 +398,13 @@ header_validate_error:
ret = GST_FLOW_ERROR;
goto done;
}
payload_validate_error:
{
GST_ELEMENT_ERROR (this, STREAM, DECODE, (NULL),
("GDP packet payload does not validate"));
ret = GST_FLOW_ERROR;
goto done;
}
wrong_type:
{
GST_ELEMENT_ERROR (this, STREAM, DECODE, (NULL),