[vlc-devel] [PATCH 2/2] Fix libvlc_media_get_tracks_info()

Laurent Aimar fenrir at elivagar.org
Thu Dec 2 10:02:26 CET 2010


Hi

On Thu, Dec 02, 2010 at 09:49:29AM +0100, Rafaël Carré wrote:
 Without checking for the codec, we can see the input codec (what
> interests us) be replaced by the output pixel format, e.g.
>     mp4v -> I420
> 
> The es identifier (es_format_t::i_id) is also not consistent and we can
> see e.g.
>     mp4v -> mpga (the video ES is replaced by the audio ES)
> ---
>  src/input/item.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/src/input/item.c b/src/input/item.c
> index e47a1e1..273cc9a 100644
> --- a/src/input/item.c
> +++ b/src/input/item.c
> @@ -1071,9 +1071,13 @@ void input_item_UpdateTracksInfo(input_item_t *item, const es_format_t *fmt)
>              continue;
>  
>          /* We've found the right ES, replace it */
> +        /* FIXME: Unless it's not really the right ES */
> +        if (item->es[i]->i_codec == fmt->i_codec)
> +        {
>          es_format_Clean(item->es[i]);
>          free(item->es[i]);
>          item->es[i] = fmt_copy;
> +        }
 I don't think this is right. The calling code should be reviewed to understand
why that happens.

-- 
fenrir




More information about the vlc-devel mailing list