It is allowed to send/receive UDP packets with no data. When such
a packet is available, select() will return with success but
ioctl(FIONREAD) will return 0. But a read() must still occur in
order to clear off the UDP packet from the queue.
This patch will read the dataless packet from the socket. If
select() was woken for other reasons (and FIONREAD returns 0),
this may result in a UDP packet getting accidentally dropped.
But since UDP is not reliable, this is acceptable.
NOTE: This patch fixes a nasty bug where sending a dataless
UDP packet to a udpsrc instance will cause an infinite
loop.
https://bugzilla.gnome.org/show_bug.cgi?id=666644
Signed-off-by: John Ogness <john.ogness@linutronix.de>
remove unused variable to fix compile error:
make -C audioparsers
make[3]: Betrete Verzeichnis '/home/lex/tmp/gst-plugins-good/gst/audioparsers'
CC libgstaudioparsers_la-gstaacparse.lo
gstaacparse.c: In function 'gst_aac_parse_read_loas_audio_specific_config':
gstaacparse.c:446:12: error: variable 'sbr' set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors
Signed-off-by: Oleksij Rempel (Alexey Fisher) <bug-track@fisher-privat.net>
... rather than having (potentially) unnecessary duplicates written all over,
or even contradictory varying filesize info, or duration info that will not
be rewritten upon header rewrite.
The LOAS variant seems to have three different subvariants itself,
only one of them is implemented as my two samples happen to be
using that one.
The sample rate is not always reported correctly, as the "main"
sample rate is apparently sometimes half what it should be (both
of my samples report 24000 Hz there), and there are two other
parts of the subvariant with different sampling rates. One of them
is parsed, but not the other, as it's located after some other
large amount of variable data that needs parsing first, and there
seems to be a LOT of it, which is useless for our needs here.
This ends up being rather inconsequential, as ffdec_aac_latm,
which is the only decoder that can decode such streams, does not
need the sample rate on the caps anyway.
https://bugzilla.gnome.org/show_bug.cgi?id=665394
Use unsigned specifiers for all unsigned values.
A lot of the values used here are unsigned, and some can take
high enough values that their signed counterpart will be negative.
https://bugzilla.gnome.org/show_bug.cgi?id=665911