avtp: Various memory and socket handling issues
The following discussions from !361 (merged) should be addressed:
-
@slomo started a discussion: This is suboptimal as it blocks until a packet is received, which makes pipeline shutdown a bit exciting :) This should probably make use of
GstPoll
or directly use the gioGSocket
API. Unblocking this function here should happen as part ofGstBaseSrc::unlock
. -
@slomo started a discussion: Casting raw data like this is inviting
SIGBUS
and endianess issues and all kinds of undefined behaviour. It would be better to use aGstByteReader
or similar here.The same probably applies to other code too, but this one caught my eye.
-
@slomo started a discussion: Raw audio data needs to be properly aligned according to the basic sample type (e.g. 2-byte aligned for S16). This is not ensuring that the alignment is correct.
That's what I found while looking for 5 minutes. The whole plugin should probably get another review.