I have fixed the problem. The patch is attached. The segfault was caused by a too small conversion buffer being specified in mpgatofixed32 due to an incorrect value in p_filter->fmt_out.audio.i_bitspersample. Namely, if mpga->s16l is requested, , a filter that is mgpa to fl32 is returned, and transcode is aware of that the output is fl32, although it requested s16l.  This is the reason for the "FIXME FIXME ..." in transcode.c:1212, that code will account for a filter returning a format that it hasnt requested. This also caused a segfault in mpgatofixed32 because it relies on p_filter->fmt_out.audio.i_bitspersample being correct when it allocates its buffers. p_filter->fmt_out.audio.i_bitspersample incorrectly held the value 16, which is only half the buffer size requested.<br>
<br> I modified the  filters chain to account for this difference. This is pretty much the exact same thing the old filters code did. My next step is to revamp the filters/transcode code so that any number of audio filters can be requested, and the filter chain will intelligently hook them up together, and account for any format differences that arise. <br>
<br><div class="gmail_quote">On Fri, Jun 13, 2008 at 11:17 AM, Rafaël Carré <<a href="mailto:rcarre@m2x.nl">rcarre@m2x.nl</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">On Fri, 2008-06-13 at 10:49 -0400, Kevin DuBois wrote:<br>
> So the when using the mpgatofixed32 filter in the new audio<br>
> transcoding chain configuration, segfaulting occurs. This filter is<br>
> used whenever mpga is input, so this effectively breaks the streaming<br>
> of dvb, mpeg files, etc.  I beleive that this bug would also manifest<br>
> itself in other audio filter2 modules like headphone, but it does not<br>
> exist in format. This bug was not present before about june 4th.<br>
><br>
> I have seen it segfault in three different ways (i.e. different<br>
> backtraces for different runs), all with the same binary/libraries.<br>
> They are listed below, the third one being the rarest to see.<br>
><br>
> I've spent some time looking into it, and only got pretty confused as<br>
> to where to look, so even if no one can fix it, pointers as to how to<br>
> procede would be most appreciated. The best i can come up with for an<br>
> explanation is that something is getting improperly allocated or<br>
> deallocated in the code for the audio buffers. I'm a bit new to coding<br>
> in such a big project, so I appreciate any help I can get!<br>
><br>
> configuration:<br>
> ./configure --prefix=/usr/local --enable-dvb --enable-ffmpeg<br>
> --disable-qt4 --disable-skins2 --enable-debug<br>
><br>
> (gdb) show args<br>
> Argument list to give program being debugged when it is started is<br>
> "dvb:// --dvb-frequency=12020000 --dvb-srate=2034000<br>
> --dvb-lnb-lof1=10750000 --dvb-satno=0 --dvb-high-voltage<br>
> --dvb-voltage=18 -vvv --sout<br>
> '#transcode{acodec=mp4a}:rtp{dst=<a href="http://10.0.9.121" target="_blank">10.0.9.121</a>,<br>
> sdp=file:///home/kdubois/test.sdp}'".<br>
><br>
><br>
> SEGFAULT 1<br>
><br>
> *** glibc detected *** double free or corruption (!prev): 0x082da820<br>
> ***<br>
<br>
</div></div>That message makes me want to use valgrind<br>
<div class="Ih2E3d"><br>
> Program received signal SIGABRT, Aborted.<br>
> [Switching to Thread -1362109520 (LWP 16179)]<br>
> 0xffffe410 in __kernel_vsyscall ()<br>
> (gdb) bt<br>
> #0  0xffffe410 in __kernel_vsyscall ()<br>
> #1  0xb7d1d811 in raise () from /lib/tls/i686/cmov/libc.so.6<br>
> #2  0xb7d1efb9 in abort () from /lib/tls/i686/cmov/libc.so.6<br>
> #3  0xb7d52dfa in __fsetlocking () from /lib/tls/i686/cmov/libc.so.6<br>
> #4  0xb7d5a68f in mallopt () from /lib/tls/i686/cmov/libc.so.6<br>
> #5  0xb7d5a732 in free () from /lib/tls/i686/cmov/libc.so.6<br>
<br>
</div>Use valgrind<br>
<div class="Ih2E3d"><br>
> SEGFAULT 2<br>
><br>
> Program received signal SIGSEGV, Segmentation fault.<br>
> [Switching to Thread -1362109520 (LWP 16249)]<br>
> 0xb7da036f in mallopt () from /lib/tls/i686/cmov/libc.so.6<br>
> (gdb) bt<br>
> #0  0xb7da036f in mallopt () from /lib/tls/i686/cmov/libc.so.6<br>
> #1  0xb7da0732 in free () from /lib/tls/i686/cmov/libc.so.6<br>
<br>
</div>Use valgrind<br>
<font color="#888888"><br>
--<br>
Rafaël Carré <<a href="mailto:rcarre@m2x.nl">rcarre@m2x.nl</a>><br>
<br>
_______________________________________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="http://mailman.videolan.org/listinfo/vlc-devel" target="_blank">http://mailman.videolan.org/listinfo/vlc-devel</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Kevin DuBois<br><a href="mailto:kdub432@gmail.com">kdub432@gmail.com</a><br>PGP Key fingerprint = 80CF 7C1D 0A1C BE03 2203 95B6 1515 C3DC B6BE 7E88<br>