mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
oggmux: push eos event when empty pad data
If gst_ogg_mux_queue_pads returns NULL it means we are at EOS, because we get a NULL buffer and this function never sets bestpad. https://bugzilla.gnome.org/show_bug.cgi?id=729315
This commit is contained in:
parent
2d0ecd7ff8
commit
43ae5a17ce
1 changed files with 14 additions and 7 deletions
|
@ -2028,20 +2028,27 @@ gst_ogg_mux_collected (GstCollectPads * pads, GstOggMux * ogg_mux)
|
||||||
if (popped)
|
if (popped)
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
|
|
||||||
if (best == NULL || best->buffer == NULL) {
|
if (best == NULL) {
|
||||||
/* This is not supposed to happen */
|
/* No data, assume EOS */
|
||||||
return GST_FLOW_ERROR;
|
goto eos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* This is not supposed to happen */
|
||||||
|
g_return_val_if_fail (best->buffer != NULL, GST_FLOW_ERROR);
|
||||||
|
|
||||||
ret = gst_ogg_mux_process_best_pad (ogg_mux, best);
|
ret = gst_ogg_mux_process_best_pad (ogg_mux, best);
|
||||||
|
|
||||||
if (best->eos && all_pads_eos (pads)) {
|
if (best->eos && all_pads_eos (pads))
|
||||||
GST_LOG_OBJECT (ogg_mux->srcpad, "sending EOS");
|
goto eos;
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
eos:
|
||||||
|
{
|
||||||
|
GST_DEBUG_OBJECT (ogg_mux, "no data available, must be EOS");
|
||||||
gst_pad_push_event (ogg_mux->srcpad, gst_event_new_eos ());
|
gst_pad_push_event (ogg_mux->srcpad, gst_event_new_eos ());
|
||||||
return GST_FLOW_EOS;
|
return GST_FLOW_EOS;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue