[gstreamer-bugs] [Bug 339287] New: [lame] segfault if EOS before setcaps
GStreamer (bugzilla.gnome.org)
bugzilla-daemon at bugzilla.gnome.org
Fri Apr 21 04:59:02 PDT 2006
Do not reply to this via email (we are currently unable to handle email
responses and they get discarded). You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=339287
GStreamer | gst-plugins-ugly | Ver: HEAD CVS
Summary: [lame] segfault if EOS before setcaps
Product: GStreamer
Version: HEAD CVS
Platform: Other
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: gst-plugins-ugly
AssignedTo: gstreamer-bugs at lists.sourceforge.net
ReportedBy: ed at catmur.co.uk
QAContact: gstreamer-bugs at lists.sourceforge.net
GNOME version: 2.13/2.14
GNOME milestone: Unspecified
$ GST_DEBUG=lame:5 gst-launch-0.10 filesrc location=/dev/null ! lame
DEBUG (0x80509a0 - 0:00:01.710567000) lame( 6909)
gstlame.c(521):gst_lame_init:<GstLame at 0x80e5090> starting initialization
DEBUG (0x80509a0 - 0:00:01.711124000) lame( 6909)
gstlame.c(590):gst_lame_init:<GstLame at 0x80e5090> done initializing
Setting pipeline to PAUSED ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
DEBUG (0x80e67b8 - 0:00:01.714604000) lame( 6909)
gstlame.c(957):gst_lame_sink_event:<lame0> handling EOS event
Segmentation fault
Obviously I'd usually be feeding an actual media file in - but EOS before
setcaps does happen sometimes, particularly with buggy media files.
Backtrace:
(gdb) bt
#0 lame_encode_flush (gfp=0x0, mp3buffer=0x80eb500 "¸!÷",
mp3buffer_size=7200) at lame.c:1825
#1 0xb7ae0fc2 in gst_lame_sink_event (pad=0x80e1100, event=0x80662a0)
at gstlame.c:959
#2 0xb7f3951f in gst_pad_send_event (pad=0x80e1100, event=0x80662a0)
at gstpad.c:3731
#3 0xb7f39cc8 in gst_pad_push_event (pad=0x80662a0, event=0x80662a0)
at gstpad.c:3597
static gboolean
gst_lame_sink_event (GstPad * pad, GstEvent * event)
{
gboolean ret;
GstLame *lame;
lame = GST_LAME (gst_pad_get_parent (pad));
switch (GST_EVENT_TYPE (event)) {
case GST_EVENT_EOS:{
GstBuffer *buf;
gint size;
GST_DEBUG_OBJECT (lame, "handling EOS event");
buf = gst_buffer_new_and_alloc (7200);
size = lame_encode_flush (lame->lgf, GST_BUFFER_DATA (buf), 7200);
Because setcaps has not yet run, lame->lgf is NULL.
Suggested fix: wrap ll 954-968 in if (G_LIKELY(lame->lgf != NULL)).
--
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the Gstreamer-bugs
mailing list