mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
gstminiobject: shares capacity increase
during the MSE (WebKit) tests from Apple suite: https://hls-streaming.cdn-apple.com/hls_conformance/dist/v1.1/index.html?pretty=true&whitelist=MSE%20Suite webkit attempts to add a single audio buffer containing ~35.5k frames. when corresponding GstSamples are pulled buffer is being referenced more than object capacity allows: 2^15-1. since the case could be considered malformed a surgical patch is applied to increase the capacity. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3221>
This commit is contained in:
parent
11c74ccec6
commit
095bca9bdb
1 changed files with 7 additions and 7 deletions
|
@ -217,7 +217,7 @@ gst_mini_object_copy (const GstMiniObject * mini_object)
|
||||||
gboolean
|
gboolean
|
||||||
gst_mini_object_lock (GstMiniObject * object, GstLockFlags flags)
|
gst_mini_object_lock (GstMiniObject * object, GstLockFlags flags)
|
||||||
{
|
{
|
||||||
gint access_mode, state, newstate;
|
guint access_mode, state, newstate;
|
||||||
|
|
||||||
g_return_val_if_fail (object != NULL, FALSE);
|
g_return_val_if_fail (object != NULL, FALSE);
|
||||||
g_return_val_if_fail (GST_MINI_OBJECT_IS_LOCKABLE (object), FALSE);
|
g_return_val_if_fail (GST_MINI_OBJECT_IS_LOCKABLE (object), FALSE);
|
||||||
|
@ -228,9 +228,9 @@ gst_mini_object_lock (GstMiniObject * object, GstLockFlags flags)
|
||||||
|
|
||||||
do {
|
do {
|
||||||
access_mode = flags & FLAG_MASK;
|
access_mode = flags & FLAG_MASK;
|
||||||
newstate = state = g_atomic_int_get (&object->lockstate);
|
newstate = state = (guint) g_atomic_int_get (&object->lockstate);
|
||||||
|
|
||||||
GST_CAT_TRACE (GST_CAT_LOCKING, "lock %p: state %08x, access_mode %d",
|
GST_CAT_TRACE (GST_CAT_LOCKING, "lock %p: state %08x, access_mode %u",
|
||||||
object, state, access_mode);
|
object, state, access_mode);
|
||||||
|
|
||||||
if (access_mode & GST_LOCK_FLAG_EXCLUSIVE) {
|
if (access_mode & GST_LOCK_FLAG_EXCLUSIVE) {
|
||||||
|
@ -265,7 +265,7 @@ gst_mini_object_lock (GstMiniObject * object, GstLockFlags flags)
|
||||||
lock_failed:
|
lock_failed:
|
||||||
{
|
{
|
||||||
GST_CAT_DEBUG (GST_CAT_LOCKING,
|
GST_CAT_DEBUG (GST_CAT_LOCKING,
|
||||||
"lock failed %p: state %08x, access_mode %d", object, state,
|
"lock failed %p: state %08x, access_mode %u", object, state,
|
||||||
access_mode);
|
access_mode);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -281,16 +281,16 @@ lock_failed:
|
||||||
void
|
void
|
||||||
gst_mini_object_unlock (GstMiniObject * object, GstLockFlags flags)
|
gst_mini_object_unlock (GstMiniObject * object, GstLockFlags flags)
|
||||||
{
|
{
|
||||||
gint access_mode, state, newstate;
|
guint access_mode, state, newstate;
|
||||||
|
|
||||||
g_return_if_fail (object != NULL);
|
g_return_if_fail (object != NULL);
|
||||||
g_return_if_fail (GST_MINI_OBJECT_IS_LOCKABLE (object));
|
g_return_if_fail (GST_MINI_OBJECT_IS_LOCKABLE (object));
|
||||||
|
|
||||||
do {
|
do {
|
||||||
access_mode = flags & FLAG_MASK;
|
access_mode = flags & FLAG_MASK;
|
||||||
newstate = state = g_atomic_int_get (&object->lockstate);
|
newstate = state = (guint) g_atomic_int_get (&object->lockstate);
|
||||||
|
|
||||||
GST_CAT_TRACE (GST_CAT_LOCKING, "unlock %p: state %08x, access_mode %d",
|
GST_CAT_TRACE (GST_CAT_LOCKING, "unlock %p: state %08x, access_mode %u",
|
||||||
object, state, access_mode);
|
object, state, access_mode);
|
||||||
|
|
||||||
if (access_mode & GST_LOCK_FLAG_EXCLUSIVE) {
|
if (access_mode & GST_LOCK_FLAG_EXCLUSIVE) {
|
||||||
|
|
Loading…
Reference in a new issue