[vlc-devel] [PATCH] Smem Stream output module

christophe courtaut christophe.courtaut at gmail.com
Thu Aug 20 14:58:34 CEST 2009


On Thu, Aug 20, 2009 at 2:08 PM, Rafaël Carré<rafael.carre at gmail.com> wrote:
> On Thu, 20 Aug 2009 13:48:17 +0200
> christophe courtaut <christophe.courtaut at gmail.com> wrote:
>
> Hi, i have a few small comments
>
>> From d51e0d64fb952f3b5f78c89ea12183dce7231806 Mon Sep 17 00:00:00 2001
>> From: Christophe Courtaut <christophe.courtaut at gmail.com>
>> Date: Fri, 31 Jul 2009 15:59:09 +0200
>> Subject: [PATCH] Functionnal version of smem stream output module
>
>> +    psz_tmp = var_CreateGetString( p_stream, SOUT_PREFIX_VIDEO
>> "chroma" );
>> +    memcpy( &p_sys->i_video_chroma, psz_tmp, 4 );
>> +    free( psz_tmp );
>
> you should use strncpy to check psz_tmp len

I now use strncpy, but strncpy does'nt allow you to check how many
bytes where copied, as it returns a pointer to dest.

>> +static void Close( vlc_object_t * p_this ) +{
>> +    sout_stream_t *p_stream = (sout_stream_t*)p_this;
>> +    if ( p_stream->p_sys->time_sync )
>> +        p_stream->p_sout->i_out_pace_nocontrol--;
>> +
>> +    (void)p_this;
>
> not needed ^
>
>> +}

Removed.

>> +    p_sys->p_decoder->fmt_out.p_extra = 0;

> it should be NULL because p_extra is a pointer (i know some similar
> code use this but it should be fixed as well)

Done.

> (void) or VLC_UNUSED() are both ok, (VLC_UNUSED is defined to void) but
> please try to use the same ;)

Now i use VLC_UNUSED everywhere in the patch.

> is "inline static" different from "static inline" ?

No.

I also fixed some warnings.

Best regards

-- 
Christophe Courtaut
Etudiant a Epitech, Ingenierie en Informatique (Promo 2010)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Functionnal-version-of-smem-stream-output-module.patch
Type: application/octet-stream
Size: 21200 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20090820/78f7e5aa/attachment.obj>


More information about the vlc-devel mailing list