mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 04:56:14 +00:00
output-selector: add drain handling
Release the latest buffer, if any, and then just let the drain be pushed downstream
This commit is contained in:
parent
fa4768f36b
commit
25295ee285
1 changed files with 7 additions and 0 deletions
|
@ -595,9 +595,16 @@ gst_output_selector_query (GstPad * pad, GstObject * parent, GstQuery * query)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case GST_QUERY_DRAIN:
|
||||||
|
if (sel->latest_buffer) {
|
||||||
|
gst_buffer_unref (sel->latest_buffer);
|
||||||
|
sel->latest_buffer = NULL;
|
||||||
|
}
|
||||||
|
/* fall through */
|
||||||
default:
|
default:
|
||||||
res = gst_pad_query_default (pad, parent, query);
|
res = gst_pad_query_default (pad, parent, query);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue