[gst-devel] crashing on some mp3s

Jorn Baayen jorn at nl.linux.org
Thu Apr 11 12:02:16 CEST 2002


On Thu, Apr 11, 2002 at 06:30:42PM +0200, Ronald Bultje wrote:
> Hi Jorn,
> 
> On Thu, 2002-04-11 at 17:51, Jorn Baayen wrote:
> > gst-launch filesrc location="broken.mp3" ! mad ! osssink
> > 
> > #0  0x80499d7 in __udivdi3 (n=0, d=0)
> 
> sounds like a division through zero. Shouldn't that give an arithmetic
> exception instead of a segfault?
> 
> > #1  0x404652e2 in gst_mad_chain ()
> >    from /stuff/gnome/head/INSTALL/lib/gst/libgstmad.so
> 
> gst-plugins/ext/mad/gstmad.c, line 464:
> [..]
>       if (mad->frame.header.layer == MAD_LAYER_I)
>         N = ((12 * mad->frame.header.bitrate /
> mad->frame.header.samplerate) + pad_slot) * 4;
>       else {
>         unsigned int slots_per_frame;
> 
>         slots_per_frame = (mad->frame.header.layer == MAD_LAYER_III &&
>                            (mad->frame.header.flags & MAD_FLAG_LSF_EXT))
> ? 72 : 144;
> 
>         N = (slots_per_frame * mad->frame.header.bitrate /
> mad->frame.header.samplerate) + pad_slot;
>       }
> [..]
> gst-plugins/ext/mad/gstmad.c, line 492:
> [..]
>       GST_BUFFER_TIMESTAMP (outbuffer) = mad->sync_point + 
> 	      				 mad->total_samples * 1000000LL /
> mad->frame.header.samplerate;
> [..]

It's this one. mad->frame.header.samplerate apparantly is 0 in some cases ...

Hope you can find a way around it :)

Cheers
Jorn

> 
> this is suspicious, it's the only divisions in this function ;-). The
> former one didn't use to be there, amd it's outcome (N) isn't used
> anywhere, it seems. Try commenting this out and try again.
> 
> Ronald
> 
> -- 
> -   .-.
> -   /V\    | Ronald Bultje <rbultje at ronald.bitfreak.net>
> -  // \\   | Running: Linux 2.4.18-XFS and OpenBSD 3.0
> - /(   )\  | http://ronald.bitfreak.net/
> -  ^^-^^
> 




More information about the gstreamer-devel mailing list