[gstreamer-bugs] [Bug 305428] New: [audiorate] crashes if first buffer has offset of GST_CLOCK_TIME_NONE
bugzilla-daemon at bugzilla.gnome.org
bugzilla-daemon at bugzilla.gnome.org
Wed May 25 06:37:34 PDT 2005
Please DO NOT reply to this by email. All additional comments should be made in
the comments box of this bug report.
http://bugzilla.gnome.org/show_bug.cgi?id=305428
GStreamer | gst-plugins | Ver: 0.8.8
Summary: [audiorate] crashes if first buffer has offset of
GST_CLOCK_TIME_NONE
Product: GStreamer
Version: 0.8.8
Platform: Other
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: gst-plugins
AssignedTo: gstreamer-bugs at lists.sourceforge.net
ReportedBy: t.i.m at zen.co.uk
QAContact: gstreamer-bugs at lists.sourceforge.net
CC: all-bugs at bugzilla.gnome.org
audiorate crashes if the first buffer received has no offset set:
guint64 in_offset, in_offset_end;
...
if (in_offset == GST_CLOCK_TIME_NONE || in_offset_end == GST_CLOCK_TIME_NONE) {
GST_WARNING_OBJECT (audiorate, "audiorate got buffer without offsets");
}
/* do we need to insert samples */
if (in_offset > audiorate->next_offset) {
GstBuffer *fill;
gint fillsize;
guint64 fillsamples;
fillsamples = in_offset - audiorate->next_offset;
fillsize = fillsamples * audiorate->bytes_per_sample;
fill = gst_buffer_new_and_alloc (fillsize);
memset (GST_BUFFER_DATA (fill), 0, fillsize);
Here in_offset is (guint64)-1 which of course is bigger than
audiorate->next_offset, so fillsamples will be -1 and fillsize will be -4 or
another negative number, and memory can't be allocated => crash.
Not sure what the correct solution is (drop the buffer? send it on without
processing? Assume an offset of 0?)
Cheers
-Tim
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are the QA contact for the bug.
More information about the Gstreamer-bugs
mailing list