mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 12:10:37 +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
|
@ -389,10 +389,13 @@ gst_output_selector_chain (GstPad * pad, GstBuffer * buf)
|
|||
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