[vlc-devel] [PATCH] input/control: remove unnecessar memory allocation

Filip Roséen filip at atch.se
Thu Mar 2 17:32:25 CET 2017


Hi `vlc-devel`,

On 2017-03-01 09:52, Filip Roséen wrote:

> diff --git a/src/input/control.c b/src/input/control.c
> index f4781eb1a5..ff6df4c2fe 100644
> --- a/src/input/control.c
> +++ b/src/input/control.c
> @@ -399,7 +399,7 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
>                  return VLC_EGENERIC;
>              }
>  
> -            input_title_t *p_title = vlc_input_title_Duplicate( priv->title[*pi_title_to_fetch] );
> +            input_title_t *p_title = priv->title[*pi_title_to_fetch];

I just noticed that this patch results in a warning due to
`input_thread_private_t::title` being *const-qualified*, and `p_title`
lacking such qualifier.

See attached patch for a fixup of [`d1feba6`][1].

Best Regards,\
Filip

[1]: http://git.videolan.org/?p=vlc.git;a=commit;h=d1feba6e5f90e48e41cc507ab574f3a1091047f5
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170302/899862ca/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-input-control-INPUT_GET_SEEKPOINTS-apply-const-to-si.patch
Type: text/x-diff
Size: 1114 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170302/899862ca/attachment.patch>


More information about the vlc-devel mailing list