[gstreamer-bugs] [Bug 386218] New: [asfdemux] Division by zero when seeking live streams
GStreamer (bugzilla.gnome.org)
bugzilla-daemon at bugzilla.gnome.org
Fri Dec 15 06:51:38 PST 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=386218
GStreamer | gst-plugins-ugly | Ver: HEAD CVS
Summary: [asfdemux] Division by zero when seeking live streams
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: riccardo.brigo at sssup.it
QAContact: gstreamer-bugs at lists.sourceforge.net
GNOME version: Unspecified
GNOME milestone: Unspecified
Symptom: trying to perform a seek over an asf file reporting play_time == 0
(live stream) causes the application to crash with a "floating point exception"
Expected result: gst_element_seek should report failure to seek
Details:
In file gst-plugins-ugly-0.10.5/gst/asfdemux/gstasfdemux.c:274
seek_packet = demux->num_packets * seek_time / demux->play_time;
but nobody checks, before of this statement, that demux->play_time is valid/not
null, so the application crashes with a "floating point exception".
In my case the problem arises when trying to seek a file originating from the
capture of a live stream, for which the file correctly reports (line numbers
are from version 0.10.4 of plugins-ugly, but relevant code is unchanged in
0.10.5):
gstasfdemux.c:1698:gst_asf_demux_process_ext_stream_props: start_time
= 0:00:00.000000000
gstasfdemux.c:1700:gst_asf_demux_process_ext_stream_props: end_time
= 0:00:00.000000000
gstasfdemux.c:1701:gst_asf_demux_process_ext_stream_props: flags
= 00000000
gstasfdemux.c:1703:gst_asf_demux_process_ext_stream_props: average time per
frame = 0:00:00.000000000
gstasfdemux.c:1704:gst_asf_demux_process_ext_stream_props: stream number
= 1
gstasfdemux.c:1707:gst_asf_demux_process_ext_stream_props: stream language ID
idx = 1 (it)
gstasfdemux.c:1708:gst_asf_demux_process_ext_stream_props: stream name count
= 0
gstasfdemux.c:1723:gst_asf_demux_process_ext_stream_props: payload ext sys
count = 0
gstasfdemux.c:1736:gst_asf_demux_process_ext_stream_props: bytes read: 64/64
0
The seeking function should check the "seekable" flag (least significant bit of
demux->ext_stream_props.flags) or at least guard against demux->play_time == 0
(which IMHO is anyway a good idea, in order to protect the application from
malformed headers), and return a "normal" failure.
Riccardo Brigo
--
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email
More information about the Gstreamer-bugs
mailing list