mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
gst/gdp/gstgdpdepay.c: Don't validate the payload if there isn't any.
Original commit message from CVS: * gst/gdp/gstgdpdepay.c: (gst_gdp_depay_chain): Don't validate the payload if there isn't any. Fixes #525915
This commit is contained in:
parent
41be2b32d0
commit
6f7b2e2a3b
1 changed files with 5 additions and 4 deletions
|
@ -260,8 +260,8 @@ gst_gdp_depay_chain (GstPad * pad, GstBuffer * buffer)
|
|||
this->header = header;
|
||||
|
||||
GST_LOG_OBJECT (this,
|
||||
"read GDP header, payload size %d, switching to state PAYLOAD",
|
||||
this->payload_length);
|
||||
"read GDP header, payload size %d, payload type %d, switching to state PAYLOAD",
|
||||
this->payload_length, this->payload_type);
|
||||
this->state = GST_GDP_DEPAY_STATE_PAYLOAD;
|
||||
break;
|
||||
}
|
||||
|
@ -288,8 +288,9 @@ gst_gdp_depay_chain (GstPad * pad, GstBuffer * buffer)
|
|||
goto wrong_type;
|
||||
}
|
||||
|
||||
if (!gst_dp_validate_payload (GST_DP_HEADER_LENGTH, this->header,
|
||||
gst_adapter_peek (this->adapter, this->payload_length))) {
|
||||
if (this->payload_length
|
||||
&& (!gst_dp_validate_payload (GST_DP_HEADER_LENGTH, this->header,
|
||||
gst_adapter_peek (this->adapter, this->payload_length)))) {
|
||||
goto payload_validate_error;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue