avcodec: use enum AVCodecID where a codec ID is expected

This commit is contained in:
Steve Lhomme 2021-06-25 14:19:46 +02:00
parent 50aeffdf10
commit c663b44b90
6 changed files with 9 additions and 9 deletions

View File

@ -202,7 +202,7 @@ vlc_module_end ()
AVCodecContext *ffmpeg_AllocContext( decoder_t *p_dec,
const AVCodec **restrict codecp )
{
unsigned i_codec_id;
enum AVCodecID i_codec_id;
const char *psz_namecodec;
const AVCodec *p_codec = NULL;

View File

@ -25,8 +25,8 @@
/* VLC <-> avcodec tables */
bool GetFfmpegCodec( enum es_format_category_e cat, vlc_fourcc_t i_fourcc,
unsigned *pi_ffmpeg_codec, const char **ppsz_name );
vlc_fourcc_t GetVlcFourcc( unsigned i_ffmpeg_codec );
enum AVCodecID *pi_ffmpeg_codec, const char **ppsz_name );
vlc_fourcc_t GetVlcFourcc( enum AVCodecID i_ffmpeg_codec );
vlc_fourcc_t GetVlcAudioFormat( int i_sample_fmt );
/* Video encoder module */

View File

@ -297,7 +297,7 @@ int InitVideoEnc( vlc_object_t *p_this )
encoder_sys_t *p_sys;
AVCodecContext *p_context;
AVCodec *p_codec = NULL;
unsigned i_codec_id;
enum AVCodecID i_codec_id;
const char *psz_namecodec;
float f_val;
char *psz_val;

View File

@ -38,7 +38,7 @@
struct vlc_avcodec_fourcc
{
vlc_fourcc_t i_fourcc;
unsigned i_codec;
enum AVCodecID i_codec;
};
/*
@ -535,7 +535,7 @@ static const struct vlc_avcodec_fourcc spu_codecs[] =
};
bool GetFfmpegCodec( enum es_format_category_e cat, vlc_fourcc_t i_fourcc,
unsigned *pi_ffmpeg_codec, const char **ppsz_name )
enum AVCodecID *pi_ffmpeg_codec, const char **ppsz_name )
{
const struct vlc_avcodec_fourcc *base;
size_t count;
@ -575,7 +575,7 @@ bool GetFfmpegCodec( enum es_format_category_e cat, vlc_fourcc_t i_fourcc,
return false;
}
vlc_fourcc_t GetVlcFourcc( unsigned i_ffmpeg_codec )
vlc_fourcc_t GetVlcFourcc( enum AVCodecID i_ffmpeg_codec )
{
for( size_t i = 0; i < ARRAY_SIZE(video_codecs); i++ )
{

View File

@ -197,7 +197,7 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
{
sout_mux_sys_t *p_sys = p_mux->p_sys;
const es_format_t *fmt = p_input->p_fmt;
unsigned i_codec_id;
enum AVCodecID i_codec_id;
msg_Dbg( p_mux, "adding input" );

View File

@ -89,7 +89,7 @@ int avparser_OpenPacketizer( vlc_object_t *p_this )
if( p_dec->fmt_in.i_codec != VLC_CODEC_VP9 )
return VLC_EGENERIC;
unsigned i_avcodec_id;
enum AVCodecID i_avcodec_id;
if( !GetFfmpegCodec( p_dec->fmt_in.i_cat, p_dec->fmt_in.i_codec,
&i_avcodec_id, NULL ) )