Commit 6006c6d4 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

avcodec: fix sign of codec ID

In C, an enumeration is unsigned unless it contains an explicit negative
member.
parent b217f60b
...@@ -258,7 +258,8 @@ vlc_module_end () ...@@ -258,7 +258,8 @@ vlc_module_end ()
static int OpenDecoder( vlc_object_t *p_this ) static int OpenDecoder( vlc_object_t *p_this )
{ {
decoder_t *p_dec = (decoder_t*) p_this; decoder_t *p_dec = (decoder_t*) p_this;
int i_cat, i_codec_id, i_result; unsigned i_codec_id;
int i_cat, i_result;
const char *psz_namecodec; const char *psz_namecodec;
AVCodecContext *p_context = NULL; AVCodecContext *p_context = NULL;
......
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
/* VLC <-> avcodec tables */ /* VLC <-> avcodec tables */
int GetFfmpegCodec( vlc_fourcc_t i_fourcc, int *pi_cat, int GetFfmpegCodec( vlc_fourcc_t i_fourcc, int *pi_cat,
int *pi_ffmpeg_codec, const char **ppsz_name ); unsigned *pi_ffmpeg_codec, const char **ppsz_name );
int GetVlcFourcc( int i_ffmpeg_codec, int *pi_cat, int GetVlcFourcc( unsigned i_ffmpeg_codec, int *pi_cat,
vlc_fourcc_t *pi_fourcc, const char **ppsz_name ); vlc_fourcc_t *pi_fourcc, const char **ppsz_name );
vlc_fourcc_t GetVlcAudioFormat( int i_sample_fmt ); vlc_fourcc_t GetVlcAudioFormat( int i_sample_fmt );
......
...@@ -203,7 +203,8 @@ int OpenEncoder( vlc_object_t *p_this ) ...@@ -203,7 +203,8 @@ int OpenEncoder( vlc_object_t *p_this )
encoder_sys_t *p_sys; encoder_sys_t *p_sys;
AVCodecContext *p_context; AVCodecContext *p_context;
AVCodec *p_codec = NULL; AVCodec *p_codec = NULL;
int i_codec_id, i_cat; unsigned i_codec_id;
int i_cat;
const char *psz_namecodec; const char *psz_namecodec;
float f_val; float f_val;
char *psz_val; char *psz_val;
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
static const struct static const struct
{ {
vlc_fourcc_t i_fourcc; vlc_fourcc_t i_fourcc;
int i_codec; unsigned i_codec;
int i_cat; int i_cat;
} codecs_table[] = } codecs_table[] =
{ {
...@@ -451,7 +451,7 @@ static const size_t codecs_count = sizeof (codecs_table) ...@@ -451,7 +451,7 @@ static const size_t codecs_count = sizeof (codecs_table)
/ sizeof (codecs_table[0]); / sizeof (codecs_table[0]);
int GetFfmpegCodec( vlc_fourcc_t i_fourcc, int *pi_cat, int GetFfmpegCodec( vlc_fourcc_t i_fourcc, int *pi_cat,
int *pi_ffmpeg_codec, const char **ppsz_name ) unsigned *pi_ffmpeg_codec, const char **ppsz_name )
{ {
i_fourcc = vlc_fourcc_GetCodec( UNKNOWN_ES, i_fourcc ); i_fourcc = vlc_fourcc_GetCodec( UNKNOWN_ES, i_fourcc );
for( unsigned i = 0; i < codecs_count; i++ ) for( unsigned i = 0; i < codecs_count; i++ )
...@@ -468,7 +468,7 @@ int GetFfmpegCodec( vlc_fourcc_t i_fourcc, int *pi_cat, ...@@ -468,7 +468,7 @@ int GetFfmpegCodec( vlc_fourcc_t i_fourcc, int *pi_cat,
return false; return false;
} }
int GetVlcFourcc( int i_ffmpeg_codec, int *pi_cat, int GetVlcFourcc( unsigned i_ffmpeg_codec, int *pi_cat,
vlc_fourcc_t *pi_fourcc, const char **ppsz_name ) vlc_fourcc_t *pi_fourcc, const char **ppsz_name )
{ {
for( unsigned i = 0; i < codecs_count; i++ ) for( unsigned i = 0; i < codecs_count; i++ )
......
...@@ -164,7 +164,7 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input ) ...@@ -164,7 +164,7 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
sout_mux_sys_t *p_sys = p_mux->p_sys; sout_mux_sys_t *p_sys = p_mux->p_sys;
AVCodecContext *codec; AVCodecContext *codec;
AVStream *stream; AVStream *stream;
int i_codec_id; unsigned i_codec_id;
msg_Dbg( p_mux, "adding input" ); msg_Dbg( p_mux, "adding input" );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment