After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 635461 - Crash in mad decoder when changing number of audio output channels in Totem while media is running
Crash in mad decoder when changing number of audio output channels in Totem w...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-ugly
git master
Other Linux
: Normal normal
: 0.10.17
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-11-21 20:32 UTC by Priit Laes (IRC: plaes)
Modified: 2010-12-16 09:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-mad-Check-whether-output-buffer-is-NULL-in-case-of-c.patch (908 bytes, patch)
2010-11-21 20:39 UTC, Priit Laes (IRC: plaes)
none Details | Review

Description Priit Laes (IRC: plaes) 2010-11-21 20:32:15 UTC
While changing the number of audio channels in Totem while media is in playing state, crash in mad decoder occurs. RFC patch upcoming...
Comment 1 Priit Laes (IRC: plaes) 2010-11-21 20:39:27 UTC
Created attachment 174980 [details] [review]
0001-mad-Check-whether-output-buffer-is-NULL-in-case-of-c.patch

This is RFC patch. Fixes the crash, but significant "blump" sound occurs when number of output channels is changed runtime. ;)
Comment 2 Sebastian Dröge (slomo) 2010-12-12 15:50:26 UTC
Do you have a sample file for reproducing this? The data should only ever be NULL at that point if the number of channels changed to 0 ;)
Comment 3 Priit Laes (IRC: plaes) 2010-12-12 16:12:34 UTC
(In reply to comment #2)
> Do you have a sample file for reproducing this? The data should only ever be
> NULL at that point if the number of channels changed to 0 ;)

It happens with almost all video files that are using mp3 audio stream.
Comment 4 Sebastian Dröge (slomo) 2010-12-12 22:46:13 UTC
Hm, do you have an URL to a publically available file that shows this behaviour?
Comment 5 Priit Laes (IRC: plaes) 2010-12-12 23:11:11 UTC
http://plaes.org/files/2010-Q4/lola-run.avi
Comment 6 Sebastian Dröge (slomo) 2010-12-15 20:24:39 UTC
Doesn't crash for me with latest GIT and this pipeline:

$ gst-launch-0.10 filesrc location=lola-run.avi ! avidemux ! mpegaudioparse ! mad ! fakesink
Comment 7 Sebastian Dröge (slomo) 2010-12-15 20:52:21 UTC
I can confirm that somewhere zero sized buffers are created but it doesn't crash for me. audioconvert complains about buffers of wrong size here when changing the totem audio output settings during playback
Comment 8 Sebastian Dröge (slomo) 2010-12-16 09:33:26 UTC
commit 3dae13383d00b4bc726b86be6e568a61ce03ab68
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Thu Dec 16 10:30:31 2010 +0100

    mad: If gst_pad_alloc_buffer() returns a buffer with the wrong size allocate
    
    Fixes bug #635461.


This should fix the crash in mad, there's still a similar issue in basetransform.
Comment 9 Sebastian Dröge (slomo) 2010-12-16 09:59:07 UTC
commit 0a74684b41831591e7a71187b59e59a78d0860b9
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Thu Dec 16 10:55:20 2010 +0100

    basetransform: Handle downstream giving a buffer with new caps but invalid size
    
    This can happen for example when downstream proposed new caps, later proposed
    the previous caps again which in turn enables passthrough mode in upstream
    elements and the wrong-sized buffer appears in an element where the caps
    change never happened. Simply allocate a new buffer in this case.
    
    See bug #635461.