diff options
author | Lasse Laukkanen <ext-lasse.2.laukkanen@nokia.com> | 2009-04-16 17:32:03 +0300 |
---|---|---|
committer | Stefan Kost <ensonic@users.sf.net> | 2009-06-05 10:00:14 +0300 |
commit | ab169897b354d1fb6bad36a66c5f2e6471cb750c (patch) | |
tree | 11c3d2dde948e2ad0b9561cc0790b963c662e39a /gst | |
parent | eff639532874f810704bd5581e308cbf7c6ad1be (diff) | |
download | gst-plugins-bad-ab169897b354d1fb6bad36a66c5f2e6471cb750c.tar.gz gst-plugins-bad-ab169897b354d1fb6bad36a66c5f2e6471cb750c.tar.bz2 gst-plugins-bad-ab169897b354d1fb6bad36a66c5f2e6471cb750c.zip |
output-selector: keep ref to buffer for resending only if explicitly requested
Diffstat (limited to 'gst')
-rw-r--r-- | gst/selector/gstoutputselector.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gst/selector/gstoutputselector.c b/gst/selector/gstoutputselector.c index bf354a74..06443cfb 100644 --- a/gst/selector/gstoutputselector.c +++ b/gst/selector/gstoutputselector.c @@ -388,11 +388,13 @@ gst_output_selector_chain (GstPad * pad, GstBuffer * buf) /* Do the switch */ gst_output_selector_switch (osel); } - - /* 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); + + 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 */ |