gstreamer/subprojects/gst-plugins-bad/ext/srtp
Michael Olbrich cb2dcf40b9 srtpdec: fix "srtp-key" check
The original code was:

if (!gst_structure_get (s, "srtp-key", GST_TYPE_BUFFER, &buf, NULL) || !buf) {
  goto error;
} else {
  stream->key = buf;
}

So use "srtp-key" if it is set so a non NULL buffer. The condition was
incorrectly inverted in ad7ffe64a6 to:

if (gst_structure_get (s, "srtp-key", GST_TYPE_BUFFER, &buf, NULL) || !buf) {
  stream->key = buf;
} ...

Fix the condition so it works as originally intended and avoid accessing
'buf' uninitialised.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4423>
2023-04-14 06:51:34 +00:00
..
gstsrtp.c
gstsrtp.h
gstsrtpdec.c srtpdec: fix "srtp-key" check 2023-04-14 06:51:34 +00:00
gstsrtpdec.h
gstsrtpelement.c
gstsrtpelements.h
gstsrtpenc.c
gstsrtpenc.h
gstsrtpenums.h
gstsrtpplugin.c
meson.build srtp: Fix test skipping when plugin option is disabled 2022-10-18 22:12:41 +00:00