summaryrefslogtreecommitdiffstats
path: root/gst/selector
diff options
context:
space:
mode:
authorLasse Laukkanen <ext-lasse.2.laukkanen@nokia.com>2009-05-04 12:29:54 +0300
committerStefan Kost <ensonic@users.sf.net>2009-06-05 10:00:29 +0300
commit97ccdf9460549c04c2db5a6fae6633fa7d99c740 (patch)
tree2b75ff32460e58c184c031c842182a2e78b83239 /gst/selector
parentab169897b354d1fb6bad36a66c5f2e6471cb750c (diff)
downloadgst-plugins-bad-97ccdf9460549c04c2db5a6fae6633fa7d99c740.tar.gz
gst-plugins-bad-97ccdf9460549c04c2db5a6fae6633fa7d99c740.tar.bz2
gst-plugins-bad-97ccdf9460549c04c2db5a6fae6633fa7d99c740.zip
output-selector: unref latest buffer also when resending has been disabled
Diffstat (limited to 'gst/selector')
-rw-r--r--gst/selector/gstoutputselector.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gst/selector/gstoutputselector.c b/gst/selector/gstoutputselector.c
index 06443cfb..5635ab78 100644
--- a/gst/selector/gstoutputselector.c
+++ b/gst/selector/gstoutputselector.c
@@ -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);
}