mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
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
This commit is contained in:
parent
974ca7713a
commit
0cb6c9230d
1 changed files with 1 additions and 2 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue