output-selector: keep ref to buffer for resending only if explicitly requested

This commit is contained in:
Lasse Laukkanen 2009-04-16 17:32:03 +03:00 committed by Stefan Kost
parent eff6395328
commit ab169897b3

View file

@ -389,10 +389,12 @@ gst_output_selector_chain (GstPad * pad, GstBuffer * buf)
gst_output_selector_switch (osel);
}
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);
}
/* Keep track of last stop and use it in NEWSEGMENT start after
switching to a new src pad */