Commit graph

15735 commits

Author SHA1 Message Date
Tim-Philipp Müller
f4b2905700 printf: fix invalid memory access in case of %%
https://bugzilla.gnome.org/show_bug.cgi?id=748414
2015-04-24 15:24:56 +01:00
Jason Litzinger
db765a5fb8 gstinfo: fix infinite loop in gst_debug_unset_threshold_for_name()
Ensure iterator is advanced. The current list iteration code only
advances the iterator (walk) if a match is found, which results
in an infinite loop when more than one entry exists in the list.

https://bugzilla.gnome.org/show_bug.cgi?id=748321
2015-04-23 12:02:03 +01:00
Tim-Philipp Müller
f728c68d91 tee: fix use of possibly-freed pad in debug statement
The gst_object_unref() in the block above may be dropping
the last ref to the pad and free the pad. Set pad pointer
to NULL here, so that we don't accidentally use a
possibly-freed pad pointer in the debug log statements
further below, and also use the tee element as log object
since that's more appropriate anyway.

Fixes valgrind warnings and crashes in tee test_stress
unit test when debug logging is enabled.
2015-04-23 12:02:03 +01:00
Guillaume Desmottes
bcbb68d5e7 typefind: fix leak in gst_type_find_element_src_event()
gst_type_find_element_src_event() is supposed to consume @event but wasn't
doing so when it was handling the event itself.

https://bugzilla.gnome.org/show_bug.cgi?id=747775
2015-04-23 12:02:03 +01:00
Hyunjun Ko
9d0baebb0f gstvalue: reset errno before g_ascii_strtoull call
"errno" already has meaningless value before g_ascii_strtoull call.
This causes invalid error check without reset.

https://bugzilla.gnome.org/show_bug.cgi?id=747690
2015-04-23 12:02:03 +01:00
Ilya Konstantinov
1764a065a6 basesrc: do not leak buffer pool in error case
https://bugzilla.gnome.org/show_bug.cgi?id=747321
2015-04-23 12:02:03 +01:00
Sebastian Dröge
815166d1ca valve: Don't drop non-serialized queries when the valve is dropping
Otherwise we end up dropping e.g. CAPS queries, and then upstream just
negotiates to whatever format it wants to. Once the valve is not-dropping
anymore this can easily result in negotiation failing completely.

https://bugzilla.gnome.org/show_bug.cgi?id=746448
2015-04-23 12:02:02 +01:00
Sebastian Dröge
1ea8c8720e multiqueue: Don't grow queue infinitely if only one pad is linked
This was introduced by
https://bugzilla.gnome.org/show_bug.cgi?id=719893
https://bugzilla.gnome.org/show_bug.cgi?id=722891
but it doesn't make any sense at all and causes huge memory leaks.

https://bugzilla.gnome.org/show_bug.cgi?id=744253
2015-04-23 12:02:02 +01:00
Tim-Philipp Müller
39435ec128 basesink: handle empty buffer list more gracefully
Don't abort, just ignore it. It's like a buffer
without memories.
2015-04-23 12:02:02 +01:00
Sebastian Dröge
a579c882d6 bus: Fix another case where we hold the object lock while unreffing a message 2015-04-23 12:02:02 +01:00
Sebastian Dröge
a9598175ee bus: Use g_list_free_full() instead of manually unreffing and freeing
Also unref the messages, not the GList nodes.
2015-04-23 12:02:02 +01:00
Vivia Nikolaidou
432f8f392a bus: Unreferencing messages outside the lock
Shouldn't take the lock while unreferencing messages, because that may cause
more messages to be sent, which will try to take the lock and cause the app to
hang.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=728777
2015-04-23 11:27:23 +01:00
Duncan Palmer
197b1d509c multiqueue: Don't automatically enter the buffering state when use-buffering is set.
There is no reason I can see to set mq->buffering = TRUE when
use_buffering is set; the code here also calls update_buffering(), which
will set mq->buffering = TRUE if this is warranted because of low buffer
levels.

https://bugzilla.gnome.org/show_bug.cgi?id=745937
2015-04-10 10:51:18 -03:00
Sebastian Dröge
ae4c70813b Release 1.4.5 2014-12-18 12:27:58 +01:00
Sebastian Dröge
5601310cef Update .po files 2014-12-18 12:04:27 +01:00
Wim Taymans
ae8c8b478f bufferpool: log reason for discarded buffers
PERFORMANCE log the reason why a buffer could not be recycled in the
bufferpool.
2014-12-16 12:27:58 +01:00
Edward Hervey
08b5df08a9 basesink: clamp reported position based on direction
When using a negative rate (rate being segment.rate * segment.applied_rate),
we will end up reporting decreasing positions, therefore adjust the clamping
against last reported value accordingly.

Fixes positions getting properly reported with applied_rate < 0.0

https://bugzilla.gnome.org/show_bug.cgi?id=738092
2014-12-11 14:04:56 +00:00
Thiago Santos
c8126924c2 baseparse: update the duration variable before emitting the bus
Otherwise the application might still get the old value if it asks
between the message and the real update.
2014-12-11 14:02:59 +00:00
Edward Hervey
86ca8c41fa element: Fix doc and default implementation of send_event
The documentation states that gst_element_send_event is to "send an event
to an element".

Therefore we *send* upstream events to a source pad and downstream events
to a sink pad
2014-11-28 17:25:14 +01:00
Edward Hervey
6e027c5456 element: Figure default send_event direction handling
If we get a downstream event we want to send it to a random SINK pad
(and vice-versa).
2014-11-28 17:25:14 +01:00
Thiago Santos
cafe1f2fc9 queue2: percentage is relative to high-percent
When comparing percentage values, compare with 0-100 scale as it
has already been made relative to 0-high_percent, otherwise we mark
the queue as not buffering and report a 50% to the user. This leads to
a buffering stall as the user assumes the queue is still buffering but
it thinks it isn't.

https://bugzilla.gnome.org/show_bug.cgi?id=736969
2014-11-23 05:57:46 -03:00
Thiago Santos
81f13a5a2c multiqueue: percentage is an absolute value
multiqueue's queues stored percent value is the percentage from 0
to 100 (max-size-*) and should be compared with the requested limit
(high_percentage) set by the user and not with 100% to check if
buffering should stop. Otherwise we are only stopping buffering when the
queue gets completely full.
2014-11-23 05:57:46 -03:00
Wim Taymans
3b1de023fc structure: don't overread input when searching for "
When searching for the string terminator don't read past the ending
0-byte when escaping characters.
Add unit test for various escaping cases.
2014-11-20 21:51:06 +01:00
Vincent Penquerc'h
4d7b9a91c4 pad: fail dropped queries
Previously, dropping a query from a pad probe would deem the
query succeeded, and the caller might then assume the query's
results are valid, and thus dereference an invalid object
such as a GstCaps.

We now assume dropped queries did not succeed. Dropped events
and buffers are still deemed a success.
2014-11-15 22:07:14 +00:00
Haakon Sporsheim
050ba7d911 task: Fix pause/stop race condition
If a task thread is calling pause on it self and the
controlling/"main" thread stops the task, it could end in a race
where gst_task_func loops and then checks for paused after the
controlling thread just changed the task state to stopped.
Hence the task would actually call func again even though it was
both paused and stopped.

https://bugzilla.gnome.org/show_bug.cgi?id=740001
2014-11-15 22:06:49 +00:00
Sebastian Dröge
410086dd12 Release 1.4.4 2014-11-06 12:51:42 +01:00
Sebastian Dröge
7cf9a44e02 Update .po files 2014-11-06 12:25:58 +01:00
Tim-Philipp Müller
37fa36f876 basesink: don't unlock mutex that is not locked
Fixes 'Attempt to unlock mutex that was not locked'
warning with newer GLibs when sink is shut down in
certain situations. Triggered by the decodebin
test_reuse_without_decoders unit test in -base
sometimes, esp. on slower machines.
2014-10-24 20:11:49 +01:00
Andrei Sarakeev
83421a0d59 multiqueue: Wake up any waiting streams if the current one goes EOS
Otherwise we might have unlinked streams waiting.

https://bugzilla.gnome.org/show_bug.cgi?id=738198
2014-10-24 20:11:27 +01:00
Guillaume Desmottes
250e5e6038 docs: pwg: fix typo in 'Dynamic negotiation' section
The point of this example is to show how to set caps
on the source pad once it has been set on the sink pad.
So, in passthrough mode, the caps is just copied to the
source pad.

https://bugzilla.gnome.org/show_bug.cgi?id=738153
2014-10-24 20:05:41 +01:00
Nicolas Huet
6d4708a4db systemclock: fix multi-thread entry status issue
Running two threads, one executing the timer and one unscheduling it, the
unscheduled status set by the second thread is sometimes overwritten by the
first one.

https://bugzilla.gnome.org/show_bug.cgi?id=737999
2014-10-24 20:03:14 +01:00
Tim-Philipp Müller
6dfdb654ef tests: fix caps leak in baseparse unit test 2014-10-24 19:59:41 +01:00
Matej Knopp
0561c988ff tests: baseparse: set_sink_caps vfunc should't take ownership of the caps
https://bugzilla.gnome.org/show_bug.cgi?id=737762
2014-10-24 19:47:58 +01:00
Aleix Conchillo Flaqué
e014bac42b multiqueue: don't lock multiqueue when pushing serialized queries
If we are pushing a serialized query into a queue and the queue is
filled, we will end in a deadlock. We need to release the lock before
pushing and acquire it again afterward.

https://bugzilla.gnome.org/show_bug.cgi?id=737794
2014-10-14 09:39:27 +02:00
Sebastian Dröge
2096f51ccc queue: Add missing break in switch 2014-10-14 09:39:18 +02:00
Matej Knopp
9438cc4c69 multiqueue: update segment position on GAP events to calculate levels properly
https://bugzilla.gnome.org/show_bug.cgi?id=737498
2014-10-14 09:39:12 +02:00
Sebastian Dröge
47c5d48e58 queue: update segment position on GAP events to calculate levels properly
https://bugzilla.gnome.org/show_bug.cgi?id=737498
2014-10-14 09:39:05 +02:00
Sebastian Dröge
18a5f7ba98 queue2: update segment position on GAP events to calculate levels properly
https://bugzilla.gnome.org/show_bug.cgi?id=737498
2014-10-14 09:38:53 +02:00
Sebastian Dröge
3ce1a41144 capsfilter: Push pending events before a buffer also if upstream never configured caps but we have srcpad caps already
Otherwise we never send pending events downstream that arrive after we
configured caps on the srcpad.

https://bugzilla.gnome.org/show_bug.cgi?id=737735
2014-10-14 09:38:33 +02:00
Thibault Saunier
f285526de6 scripts: Handle gst-python in gst-uninstalled
https://bugzilla.gnome.org/show_bug.cgi?id=709082
2014-09-24 19:19:46 +02:00
Sebastian Dröge
188bec75e6 Release 1.4.3 2014-09-24 12:19:55 +03:00
Sebastian Dröge
c9dfedb6c4 Update .po files 2014-09-24 11:15:07 +03:00
Thibault Saunier
42f571ed49 capsfilter: Remove EOS event from pending_event list on FLUSH_STOP
https://bugzilla.gnome.org/show_bug.cgi?id=709868
2014-09-24 10:57:32 +03:00
Marcin Kolny
de9278fda9 datetime: added missing include directives
https://bugzilla.gnome.org/show_bug.cgi?id=737133
2014-09-24 10:10:20 +03:00
Thibault Saunier
8c7cb27c8d queue: Do not forget to release the QUEUE_LOCK in the out_flow_error path
Avoiding deadlocks!
2014-09-23 14:48:13 +02:00
Thibault Saunier
b189949427 queue: Do not hold GST_QUEUE_LOCK while posting ERROR messages
This might create deadlocks and we need to avoid holding element
specific lock while posting messages

For example a deadlock will happen if while posting the message,
someone connected on the bus (sync) tries to DOT the pipeline.

https://bugzilla.gnome.org/show_bug.cgi?id=737102
2014-09-22 16:08:42 +02:00
Thibault Saunier
4f135ad8df script:udpate: Try to rebase local changes when updating 2014-09-22 16:07:19 +02:00
Thiago Santos
7630ada89a queue2: do not post buffering messages holding the lock
It might cause deadlocks to post messages while holding the queue2
lock. To avoid this a new boolean flag is set whenever a new
buffering percent is found. The message is posted after the lock
is released.

To make sure the buffering messages are posted in the right order, messages
are posted holding another lock. This prevents 2 threads trying to post
messages at the same time.

https://bugzilla.gnome.org/show_bug.cgi?id=736969
2014-09-22 10:24:32 -03:00
Sebastian Dröge
23205f04f1 Release 1.4.2 2014-09-19 14:19:08 +03:00
Sebastian Dröge
39ee08f250 Update .po files 2014-09-19 10:45:45 +03:00