[vlc-devel] Re: [PATCH] modules/codec/spudec/parse.c

Jean-Paul Saman jean-paul.saman at planet.nl
Tue Jan 23 09:08:20 CET 2007


Hytham Alihassan wrote:
> In the following if
> statement, a check is being performed to confirm the validity of
> p_spu->i_start.  If the pointer proves to be undefined, not only
> should the code report an error, but it should also return so that a
> null pointer does not get referenced.

The above description doesn't describe the error and fix inlined below. 
If the pointer is not valid and not NULL, then the code most likely will 
fail with an "Memory Access Violation" or corrupt memory.

p_spu->i_start is of type mtime_t. What the patch fixes is that when 
there is no start display time found it returns immediately and 
informing the upper layers of that fact.

> This issue has caused me problems in the past, and since I was able to
> compile VLC on my system and make this modification, I no longer had an
> unstable VLC when trying to view subtitles on a particular mp4 file (see
> https://www.videolan.org/viewtopic.php?t=28641&view=previous&sid=3874fe79507030e9c004faedaf33f51ffor 
> 
> more information).
> 
> Thanks,
> Hytham (iChief)
> 
> On 1/21/07, Antoine Cellerier <dionoea at videolan.org> wrote:
>>
>> Please provide comments when submitting patches.

Please provide proper comments when submitting patches.

>>
>> On Sun, Jan 21, 2007, Hytham Alihassan wrote:
>> >    Index: parse.c
>> >    ===================================================================
>> >    --- parse.c (revision 18621)
>> >    +++ parse.c (working copy)
>> >    @@ -350,6 +350,7 @@
>> >    if( !p_spu->i_start )
>> >    {
>> >    msg_Err( p_dec, "no `start display' command" );
>> >    + return VLC_EGENERIC;
>> >    }
>> >    if( p_spu->i_stop <= p_spu->i_start && !p_spu->b_ephemer )
>> -- 
>> Antoine Cellerier
>> dionoea
>>
>> -- 
>> This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
>> To unsubscribe, please read http://developers.videolan.org/lists.html
>>
>>
> 

Gtz,
Jean-Paul Saman.

-- 
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html



More information about the vlc-devel mailing list