ext/ogg/gstoggmux.c (gst_ogg_mux_send_headers): Fix a segfault in strange circumstance.

Original commit message from CVS:
2005-10-17  Andy Wingo  <wingo@pobox.com>

* ext/ogg/gstoggmux.c (gst_ogg_mux_send_headers): Fix a segfault
in strange circumstance.
This commit is contained in:
Andy Wingo 2005-10-17 11:32:46 +00:00
parent 746a33e720
commit 515d52ec1d
2 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2005-10-17 Andy Wingo <wingo@pobox.com>
* ext/ogg/gstoggmux.c (gst_ogg_mux_send_headers): Fix a segfault
in strange circumstance.
2005-10-17 Julien MOUTTE <julien@moutte.net>
* gst/ffmpegcolorspace/gstffmpegcolorspace.c:

View file

@ -762,9 +762,14 @@ gst_ogg_mux_send_headers (GstOggMux * mux)
if (pad->headers) {
buf = GST_BUFFER (pad->headers->data);
pad->headers = g_list_remove (pad->headers, buf);
} else {
} else if (pad->buffer) {
buf = pad->buffer;
gst_buffer_ref (buf);
} else {
/* fixme -- I don't really know what's going on here */
GST_WARNING_OBJECT (mux, "No headers or buffers on pad %" GST_PTR_FORMAT,
pad);
continue;
}
/* create a packet from the buffer */