mirror of
https://code.videolan.org/videolan/vlc
synced 2024-08-27 04:21:53 +02:00
Do not use an enumeration for a bits field
This violates the C standard. Passing a value outside not part of the enumeration is undefined. This obviously excludes bits fields.
This commit is contained in:
parent
8c7eaa23f1
commit
2d81d79916
@ -97,11 +97,11 @@ typedef enum libvlc_state_t
|
||||
libvlc_Error
|
||||
} libvlc_state_t;
|
||||
|
||||
typedef enum libvlc_media_option_t
|
||||
enum
|
||||
{
|
||||
libvlc_media_option_trusted = 0x2,
|
||||
libvlc_media_option_unique = 0x100
|
||||
} libvlc_media_option_t;
|
||||
};
|
||||
|
||||
typedef enum libvlc_es_type_t
|
||||
{
|
||||
@ -223,7 +223,7 @@ VLC_PUBLIC_API void libvlc_media_add_option(
|
||||
VLC_PUBLIC_API void libvlc_media_add_option_flag(
|
||||
libvlc_media_t * p_md,
|
||||
const char * ppsz_options,
|
||||
libvlc_media_option_t i_flags );
|
||||
unsigned i_flags );
|
||||
|
||||
|
||||
/**
|
||||
|
@ -348,24 +348,21 @@ libvlc_media_t * libvlc_media_new_as_node( libvlc_instance_t *p_instance,
|
||||
*
|
||||
* The options are detailled in vlc --long-help, for instance "--sout-all"
|
||||
**************************************************************************/
|
||||
void libvlc_media_add_option(
|
||||
libvlc_media_t * p_md,
|
||||
const char * psz_option )
|
||||
void libvlc_media_add_option( libvlc_media_t * p_md,
|
||||
const char * psz_option )
|
||||
{
|
||||
input_item_AddOption( p_md->p_input_item, psz_option,
|
||||
libvlc_media_add_option_flag( p_md, psz_option,
|
||||
VLC_INPUT_OPTION_UNIQUE|VLC_INPUT_OPTION_TRUSTED );
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* Same as libvlc_media_add_option but with configurable flags.
|
||||
**************************************************************************/
|
||||
void libvlc_media_add_option_flag(
|
||||
libvlc_media_t * p_md,
|
||||
void libvlc_media_add_option_flag( libvlc_media_t * p_md,
|
||||
const char * ppsz_option,
|
||||
libvlc_media_option_t i_flags )
|
||||
unsigned i_flags )
|
||||
{
|
||||
input_item_AddOption( p_md->p_input_item, ppsz_option,
|
||||
i_flags );
|
||||
input_item_AddOption( p_md->p_input_item, ppsz_option, i_flags );
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user