mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 05:59:10 +00:00
output-selector: keep ref to buffer for resending only if explicitly requested
This commit is contained in:
parent
bccc960734
commit
c63ecb2b89
1 changed files with 7 additions and 5 deletions
|
@ -389,10 +389,12 @@ gst_output_selector_chain (GstPad * pad, GstBuffer * buf)
|
||||||
gst_output_selector_switch (osel);
|
gst_output_selector_switch (osel);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Keep reference to latest buffer to resend it after switch */
|
if (osel->resend_latest) {
|
||||||
if (osel->latest_buffer)
|
/* Keep reference to latest buffer to resend it after switch */
|
||||||
gst_buffer_unref (osel->latest_buffer);
|
if (osel->latest_buffer)
|
||||||
osel->latest_buffer = gst_buffer_ref (buf);
|
gst_buffer_unref (osel->latest_buffer);
|
||||||
|
osel->latest_buffer = gst_buffer_ref (buf);
|
||||||
|
}
|
||||||
|
|
||||||
/* Keep track of last stop and use it in NEWSEGMENT start after
|
/* Keep track of last stop and use it in NEWSEGMENT start after
|
||||||
switching to a new src pad */
|
switching to a new src pad */
|
||||||
|
|
Loading…
Reference in a new issue