From 9e630c23db9f48db860e25a268dc01c45f2a24d3 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Fri, 18 Apr 2008 14:54:01 +0000 Subject: [PATCH] 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 --- ChangeLog | 6 ++++++ gst/gdp/gstgdpdepay.c | 9 +++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 14ed804..acc1a9b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-04-18 Edward Hervey + + * gst/gdp/gstgdpdepay.c: (gst_gdp_depay_chain): + Don't validate the payload if there isn't any. + Fixes #525915 + 2008-04-17 Sebastian Dröge * gst-libs/gst/audio/gstringbuffer.c: (gst_ring_buffer_may_start): diff --git a/gst/gdp/gstgdpdepay.c b/gst/gdp/gstgdpdepay.c index 1341b37..644ae3b 100644 --- a/gst/gdp/gstgdpdepay.c +++ b/gst/gdp/gstgdpdepay.c @@ -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; } -- 2.7.4