mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
srtpdec: Simplify locking in gst_srtp_dec_decode_buffer
Don't drop the lock on filter just to unmap the buffer (or log a message).
This commit is contained in:
parent
b541b58937
commit
34eaeb17f2
1 changed files with 1 additions and 8 deletions
|
@ -1382,8 +1382,6 @@ unprotect:
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_OBJECT_UNLOCK (filter);
|
|
||||||
|
|
||||||
if (err != srtp_err_status_ok) {
|
if (err != srtp_err_status_ok) {
|
||||||
GST_WARNING_OBJECT (pad,
|
GST_WARNING_OBJECT (pad,
|
||||||
"Unable to unprotect buffer (unprotect failed code %d)", err);
|
"Unable to unprotect buffer (unprotect failed code %d)", err);
|
||||||
|
@ -1391,7 +1389,6 @@ unprotect:
|
||||||
/* Signal user depending on type of error */
|
/* Signal user depending on type of error */
|
||||||
switch (err) {
|
switch (err) {
|
||||||
case srtp_err_status_key_expired:
|
case srtp_err_status_key_expired:
|
||||||
GST_OBJECT_LOCK (filter);
|
|
||||||
|
|
||||||
/* Update stream */
|
/* Update stream */
|
||||||
if (find_stream_by_ssrc (filter, ssrc)) {
|
if (find_stream_by_ssrc (filter, ssrc)) {
|
||||||
|
@ -1400,6 +1397,7 @@ unprotect:
|
||||||
GST_OBJECT_LOCK (filter);
|
GST_OBJECT_LOCK (filter);
|
||||||
goto unprotect;
|
goto unprotect;
|
||||||
} else {
|
} else {
|
||||||
|
GST_OBJECT_LOCK (filter);
|
||||||
GST_WARNING_OBJECT (filter, "Hard limit reached, no new key, "
|
GST_WARNING_OBJECT (filter, "Hard limit reached, no new key, "
|
||||||
"dropping");
|
"dropping");
|
||||||
}
|
}
|
||||||
|
@ -1420,16 +1418,11 @@ unprotect:
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_buffer_unmap (buf, &map);
|
gst_buffer_unmap (buf, &map);
|
||||||
|
|
||||||
GST_OBJECT_LOCK (filter);
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_buffer_unmap (buf, &map);
|
gst_buffer_unmap (buf, &map);
|
||||||
|
|
||||||
gst_buffer_set_size (buf, size);
|
gst_buffer_set_size (buf, size);
|
||||||
|
|
||||||
GST_OBJECT_LOCK (filter);
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue