output-selector: unref latest buffer also when resending has been disabled

This commit is contained in:
Lasse Laukkanen 2009-05-04 12:29:54 +03:00 committed by Stefan Kost
parent ab169897b3
commit 97ccdf9460

View file

@ -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);
}