From: Thiago Santos Date: Tue, 24 Mar 2015 19:04:16 +0000 (-0300) Subject: output-selector: add drain handling X-Git-Tag: 1.6.1~443 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=25295ee285bdf92c8a69bbff81b3f4c98072caf4;p=platform%2Fupstream%2Fgstreamer.git output-selector: add drain handling Release the latest buffer, if any, and then just let the drain be pushed downstream --- diff --git a/plugins/elements/gstoutputselector.c b/plugins/elements/gstoutputselector.c index 8ad870c..beb4c70 100644 --- a/plugins/elements/gstoutputselector.c +++ b/plugins/elements/gstoutputselector.c @@ -595,9 +595,16 @@ gst_output_selector_query (GstPad * pad, GstObject * parent, GstQuery * query) } break; } + case GST_QUERY_DRAIN: + if (sel->latest_buffer) { + gst_buffer_unref (sel->latest_buffer); + sel->latest_buffer = NULL; + } + /* fall through */ default: res = gst_pad_query_default (pad, parent, query); break; } + return res; }