GNOME Bugzilla – Bug 522401
gdpdepay doesn't validate payload CRCs
Last modified: 2008-04-03 15:21:46 UTC
gdpdepay doesn't appear to ever call gst_dp_validate_payload() to check the payload against its CRC. By default, gdppay doesn't set the CRC, so this doesn't matter to most users. Patch forthcoming.
Upon implementing this, and testing, I found that we didn't set the payload CRCs correctly when doing payload CRCs for events. So, there will be a core patch forthcoming as well.
Created attachment 107290 [details] [review] Fix CRC calculation for event payloads Core patch to dataprotocol.c to fix CRC calculation.
Created attachment 107291 [details] [review] Check payload CRCs if they're present. Payload CRCs weren't ever being checked, even if set. Call gst_dp_validate_payload() once we have a payload, that will return immediately if we don't have payload CRCs, or check the CRC if present.
* libs/gst/dataprotocol/dataprotocol.c: (gst_dp_packet_from_event_1_0): When calculating GDP body CRC, use the correct pointer. Fixes part of #522401. and * gst/gdp/gstgdpdepay.c: (gst_gdp_depay_chain): Check the body CRC (if set) when depayloading. Fixes #522401.