mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-04 09:42:19 +00:00
ext/ogg/gstoggmux.c (gst_ogg_mux_queue_pads): Fix bug introduced with the collectpads change.
Original commit message from CVS: 2005-10-17 Andy Wingo <wingo@pobox.com> * ext/ogg/gstoggmux.c (gst_ogg_mux_queue_pads): Fix bug introduced with the collectpads change. (gst_ogg_mux_send_headers): Elevate warning to a g_critical.
This commit is contained in:
parent
43c2a24d48
commit
534baa2b1b
2 changed files with 20 additions and 13 deletions
|
@ -1,5 +1,9 @@
|
||||||
2005-10-17 Andy Wingo <wingo@pobox.com>
|
2005-10-17 Andy Wingo <wingo@pobox.com>
|
||||||
|
|
||||||
|
* ext/ogg/gstoggmux.c (gst_ogg_mux_queue_pads): Fix bug introduced
|
||||||
|
with the collectpads change.
|
||||||
|
(gst_ogg_mux_send_headers): Elevate warning to a g_critical.
|
||||||
|
|
||||||
* gst/tcp/gstmultifdsink.c: Convert to use the boilerplate macro.
|
* gst/tcp/gstmultifdsink.c: Convert to use the boilerplate macro.
|
||||||
|
|
||||||
* gst/tcp/gsttcp.c (gst_tcp_socket_read): Comment update.
|
* gst/tcp/gsttcp.c (gst_tcp_socket_read): Comment update.
|
||||||
|
|
|
@ -553,7 +553,7 @@ gst_ogg_mux_compare_pads (GstOggMux * ogg_mux, GstOggPad * old, GstOggPad * new)
|
||||||
static GstOggPad *
|
static GstOggPad *
|
||||||
gst_ogg_mux_queue_pads (GstOggMux * ogg_mux)
|
gst_ogg_mux_queue_pads (GstOggMux * ogg_mux)
|
||||||
{
|
{
|
||||||
GstOggPad *bestpad = NULL;
|
GstOggPad *bestpad = NULL, *still_hungry = NULL;
|
||||||
GSList *walk;
|
GSList *walk;
|
||||||
|
|
||||||
/* try to make sure we have a buffer from each usable pad first */
|
/* try to make sure we have a buffer from each usable pad first */
|
||||||
|
@ -585,11 +585,6 @@ gst_ogg_mux_queue_pads (GstOggMux * ogg_mux)
|
||||||
/* just ignore */
|
/* just ignore */
|
||||||
gst_buffer_unref (buf);
|
gst_buffer_unref (buf);
|
||||||
buf = NULL;
|
buf = NULL;
|
||||||
/* We discarded the data of this pad, so it's not EOS. If no bestpad
|
|
||||||
selected so far then use this one */
|
|
||||||
if (!bestpad) {
|
|
||||||
bestpad = pad;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
GST_DEBUG ("muxer: got data buffer in control state, switching "
|
GST_DEBUG ("muxer: got data buffer in control state, switching "
|
||||||
"to data mode");
|
"to data mode");
|
||||||
|
@ -603,13 +598,19 @@ gst_ogg_mux_queue_pads (GstOggMux * ogg_mux)
|
||||||
|
|
||||||
/* we should have a buffer now, see if it is the best pad to
|
/* we should have a buffer now, see if it is the best pad to
|
||||||
* pull on */
|
* pull on */
|
||||||
if (pad->buffer != NULL) {
|
if (pad->buffer) {
|
||||||
if (gst_ogg_mux_compare_pads (ogg_mux, bestpad, pad) > 0) {
|
if (gst_ogg_mux_compare_pads (ogg_mux, bestpad, pad) > 0)
|
||||||
bestpad = pad;
|
bestpad = pad;
|
||||||
}
|
} else {
|
||||||
|
still_hungry = pad;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return bestpad;
|
|
||||||
|
if (still_hungry)
|
||||||
|
/* drop back into collectpads... */
|
||||||
|
return still_hungry;
|
||||||
|
else
|
||||||
|
return bestpad;
|
||||||
}
|
}
|
||||||
|
|
||||||
static GList *
|
static GList *
|
||||||
|
@ -766,9 +767,11 @@ gst_ogg_mux_send_headers (GstOggMux * mux)
|
||||||
buf = pad->buffer;
|
buf = pad->buffer;
|
||||||
gst_buffer_ref (buf);
|
gst_buffer_ref (buf);
|
||||||
} else {
|
} else {
|
||||||
/* fixme -- I don't really know what's going on here */
|
/* fixme -- should be caught in the previous list traversal. */
|
||||||
GST_WARNING_OBJECT (mux, "No headers or buffers on pad %" GST_PTR_FORMAT,
|
GST_LOCK (pad);
|
||||||
pad);
|
g_critical ("No headers or buffers on pad %s:%s",
|
||||||
|
GST_DEBUG_PAD_NAME (pad));
|
||||||
|
GST_UNLOCK (pad);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue