mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
mpegtsmux: Avoid crash when best pad gets flushed
The 'best' pad might receive a flush event between us picking it and us popping the buffer. In this case, the buffer will be missing. Similar to https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/711 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1042>
This commit is contained in:
parent
bb19b5aa96
commit
320bc6362b
1 changed files with 4 additions and 0 deletions
|
@ -2294,6 +2294,10 @@ gst_base_ts_mux_aggregate (GstAggregator * agg, gboolean timeout)
|
||||||
GstBuffer *buffer;
|
GstBuffer *buffer;
|
||||||
|
|
||||||
buffer = gst_aggregator_pad_pop_buffer (GST_AGGREGATOR_PAD (best));
|
buffer = gst_aggregator_pad_pop_buffer (GST_AGGREGATOR_PAD (best));
|
||||||
|
if (!buffer) {
|
||||||
|
/* We might have gotten a flush event after we picked the pad */
|
||||||
|
goto done;
|
||||||
|
}
|
||||||
|
|
||||||
ret =
|
ret =
|
||||||
gst_base_ts_mux_aggregate_buffer (GST_BASE_TS_MUX (agg),
|
gst_base_ts_mux_aggregate_buffer (GST_BASE_TS_MUX (agg),
|
||||||
|
|
Loading…
Reference in a new issue