From 515d52ec1da4956301bd18bdbdbf04fc5161cb09 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Mon, 17 Oct 2005 11:32:46 +0000 Subject: [PATCH] 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 * ext/ogg/gstoggmux.c (gst_ogg_mux_send_headers): Fix a segfault in strange circumstance. --- ChangeLog | 5 +++++ ext/ogg/gstoggmux.c | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 4205196..474b407 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-10-17 Andy Wingo + + * ext/ogg/gstoggmux.c (gst_ogg_mux_send_headers): Fix a segfault + in strange circumstance. + 2005-10-17 Julien MOUTTE * gst/ffmpegcolorspace/gstffmpegcolorspace.c: diff --git a/ext/ogg/gstoggmux.c b/ext/ogg/gstoggmux.c index 6f7223f..023edf4 100644 --- a/ext/ogg/gstoggmux.c +++ b/ext/ogg/gstoggmux.c @@ -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 */ -- 2.7.4