[vlc-devel] [PATCH] vlc_es: unionize audio/video/subs in es_format_t
Francois Cartegnie
fcvlcdev at free.fr
Fri Nov 4 19:59:31 CET 2016
Le 04/11/2016 à 18:15, Thomas Guillem a écrit :
> ---
> include/vlc_es.h | 8 +++++---
> src/misc/es_format.c | 49 +++++++++++++++++++++++++++++++++----------------
> 2 files changed, 38 insertions(+), 19 deletions(-)
>
> diff --git a/include/vlc_es.h b/include/vlc_es.h
> index bb86b40..2193b3f 100644
> --- a/include/vlc_es.h
> +++ b/include/vlc_es.h
> @@ -536,10 +536,12 @@ struct es_format_t
> unsigned i_extra_languages; /**< length in bytes of extra language data pointer */
> extra_languages_t *p_extra_languages; /**< extra language data needed by some decoders */
>
> - audio_format_t audio; /**< description of audio format */
> + union {
> + audio_format_t audio; /**< description of audio format */
> + video_format_t video; /**< description of video format */
> + subs_format_t subs; /**< description of subtitle format */
> + };
Bad idea as I'm 100% sure to have seen code (muxers?) testing
video.width & such without testing ES category.
Francois
More information about the vlc-devel
mailing list