mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-21 07:46:38 +00:00
output-selector: unref latest buffer also when resending has been disabled
This commit is contained in:
parent
ab169897b3
commit
97ccdf9460
1 changed files with 5 additions and 2 deletions
|
@ -388,11 +388,14 @@ gst_output_selector_chain (GstPad * pad, GstBuffer * buf)
|
|||
/* Do the switch */
|
||||
gst_output_selector_switch (osel);
|
||||
}
|
||||
|
||||
if (osel->latest_buffer) {
|
||||
gst_buffer_unref (osel->latest_buffer);
|
||||
osel->latest_buffer = NULL;
|
||||
}
|
||||
|
||||
if (osel->resend_latest) {
|
||||
/* Keep reference to latest buffer to resend it after switch */
|
||||
if (osel->latest_buffer)
|
||||
gst_buffer_unref (osel->latest_buffer);
|
||||
osel->latest_buffer = gst_buffer_ref (buf);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue