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.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/711>
best = gst_flv_mux_find_best_pad (aggregator, &ts, timeout);
}
+ if (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 */
+ gst_object_unref (best);
+ return GST_AGGREGATOR_FLOW_NEED_DATA;
+ }
+ }
+
if (mux->new_tags && mux->streamable) {
GstBuffer *buf = gst_flv_mux_create_metadata (mux);
if (buf)
}
if (best) {
- buffer = gst_aggregator_pad_pop_buffer (GST_AGGREGATOR_PAD (best));
- g_assert (buffer);
best->dts =
gst_flv_mux_segment_to_running_time (&GST_AGGREGATOR_PAD
(best)->segment, GST_BUFFER_DTS_OR_PTS (buffer));