[vlc-devel] [PATCH] Let Render() throw an error message and return right away if the SPU region height turns out to be zero.
Fabian Keil
freebsd-listen at fabiankeil.de
Sun Jul 5 10:38:51 CEST 2009
The attached patch fixes a problem on FreeBSD 8.0 where vlc
triggers an assertion in jemalloc if the SPU region height
is zero.
The backtrace looks like this:
#0 0x0000000801118eac in thr_kill () from /lib/libc.so.7
#1 0x00000008011afa0b in abort () from /lib/libc.so.7
#2 0x0000000801196e45 in __assert () from /lib/libc.so.7
#3 0x000000080113ae81 in malloc_usable_size () from /lib/libc.so.7
#4 0x000000080113e098 in posix_memalign () from /lib/libc.so.7
#5 0x00000008007cb842 in __vout_AllocatePicture (p_this=Variable "p_this" is not available.) at vout_pictures.h:126
#6 0x00000008007cb907 in picture_New (i_chroma=1347835225, i_width=720, i_height=0, i_aspect=0) at video_output/vout_pictures.c:1023
#7 0x00000008007cd07f in subpicture_region_New (p_fmt=0x7ffffeef1ca0) at video_output/vout_subpictures.c:754
#8 0x000000080e8b6145 in ParsePacket (p_dec=0x81a875578) at parse.c:715
#9 0x000000080e8b539b in Decode (p_dec=0x81a875578, pp_block=Variable "pp_block" is not available.) at spudec.c:157
#10 0x00000008007a6bc9 in DecoderProcess (p_dec=0x81a875578, p_block=0x81a891a00) at input/decoder.c:1864
#11 0x00000008007a7d41 in DecoderThread (p_this=Variable "p_this" is not available.) at input/decoder.c:887
#12 0x00000008007f10c6 in thread_entry (data=Variable "data" is not available.) at misc/threads.c:1061
#13 0x0000000800fb44b1 in pthread_getprio () from /lib/libthr.so.3
#14 0x0000000000000000 in ?? ()
Cannot access memory at address 0x7ffffeef2000
If I understand this part of modules/codec/spudec/parse.c
correctly, they wouldn't be rendered anyway and should be
safe to skip:
726 /* Draw until we reach the bottom of the subtitle */
727 for( i_y = 0; i_y < (int)fmt.i_height * i_pitch; i_y += i_pitch )
728 {
SPUs like this exist on several of the DVDs I tried
in the last months (or maybe vlc just thinks they do).
DVDs with the problems include:
- "The West Wing" Season 6 (but Season 7 is fine again)
- "Louis&Clark" Season 1 and 2
- "Sliders" Season 4 or 5
- "The Source" (aka "The Surge")
I've been using a similar patch since a few weeks using
vlc 0.9.9a and haven't noticed any subtitle-related
problems.
With "The Surge", the added log message is shown once per
menu page entered. Without the patch, vlc abort()s right away.
With the offending "The West Wing" DVDs the first menu
is shown fine, but without the patch, trying to leave the
menu to watch an episode triggers the assertion.
Opening the VOBs directly usually works without the
patch too, provided there's no menu at the beginning.
I haven't been able to properly test the patch with
http://people.videolan.org/~jb/1.0.0/vlc-1.0.0.tar.bz2
as it regularly segfaults on FreeBSD 8.0. I'll get back
to you on this later.
Fabian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Let-Render-throw-an-error-message-and-return-right-a.patch
Type: text/x-patch
Size: 1066 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20090705/1f99c60f/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20090705/1f99c60f/attachment.sig>
More information about the vlc-devel
mailing list