diff options
author | Thiago Santos <thiago.sousa.santos@collabora.co.uk> | 2010-09-17 09:52:12 -0300 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2010-12-31 00:54:05 +0000 |
commit | 0cb6c9230d15ca162c1d4449f864d6b47d110dd4 (patch) | |
tree | 0ea360f6a8f796b344014452e71b241618ad3fee /plugins/elements/gstoutputselector.c | |
parent | 974ca7713a41b93b4958f5fbef5f083b8f929497 (diff) |
outputselector: Avoid losing the last_buffer when switching
This patch makes outputselector take an extra ref when pushing
the last_buffer to avoid it losing it during the switch function.
This makes resend-latest properly work if the active-pad is changed
during the switch function buffer pushing (on a pad probe, for example).
https://bugzilla.gnome.org/show_bug.cgi?id=629917
Diffstat (limited to 'plugins/elements/gstoutputselector.c')
-rw-r--r-- | plugins/elements/gstoutputselector.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/elements/gstoutputselector.c b/plugins/elements/gstoutputselector.c index 088bed0d2..9b75da2c2 100644 --- a/plugins/elements/gstoutputselector.c +++ b/plugins/elements/gstoutputselector.c @@ -375,8 +375,7 @@ gst_output_selector_switch (GstOutputSelector * osel) /* Resend latest buffer to newly switched pad */ if (osel->resend_latest && osel->latest_buffer) { GST_INFO ("resending latest buffer"); - gst_pad_push (osel->active_srcpad, osel->latest_buffer); - osel->latest_buffer = NULL; + gst_pad_push (osel->active_srcpad, gst_buffer_ref (osel->latest_buffer)); } } else { GST_WARNING_OBJECT (osel, "switch failed, pad not linked"); |