if (next_buf) {
ogg_mux->pulling->eos = FALSE;
gst_buffer_unref (next_buf);
- } else {
+ } else if (!ogg_mux->pulling->map.is_sparse) {
GST_DEBUG_OBJECT (ogg_mux->pulling->collect.pad, "setting eos to true");
ogg_mux->pulling->eos = TRUE;
}
if (next_buf) {
best->eos = FALSE;
gst_buffer_unref (next_buf);
- } else {
+ } else if (!best->map.is_sparse) {
GST_DEBUG_OBJECT (best->collect.pad, "setting eos to true");
best->eos = TRUE;
}
if (best->eos && all_pads_eos (pads))
goto eos;
+ /* We might have used up a cached pad->buffer. If all streams
+ * have a buffer ready in collectpads, collectpads will block at
+ * next chain, and will never call collected again. So we make a
+ * last call to _queue_pads now, to ensure that collectpads can
+ * push to at least one pad (mostly for streams with a single
+ * logical stream). */
+ gst_ogg_mux_queue_pads (ogg_mux, &popped);
+
return ret;
eos: