[vlc-commits] avformat: remove unused GetVlcFourcc() arguments
Rémi Denis-Courmont
git at videolan.org
Sat Jun 17 16:55:13 CEST 2017
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jun 17 17:53:20 2017 +0300| [7045d671675b0d2ab8f78de5b65a105791d78964] | committer: Rémi Denis-Courmont
avformat: remove unused GetVlcFourcc() arguments
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7045d671675b0d2ab8f78de5b65a105791d78964
---
modules/codec/avcodec/avcodec.h | 3 +--
modules/codec/avcodec/fourcc.c | 13 +++----------
modules/demux/avformat/demux.c | 5 ++---
3 files changed, 6 insertions(+), 15 deletions(-)
diff --git a/modules/codec/avcodec/avcodec.h b/modules/codec/avcodec/avcodec.h
index c38d6fe184..f09cdb1cd7 100644
--- a/modules/codec/avcodec/avcodec.h
+++ b/modules/codec/avcodec/avcodec.h
@@ -27,8 +27,7 @@
/* VLC <-> avcodec tables */
int GetFfmpegCodec( vlc_fourcc_t i_fourcc, int *pi_cat,
unsigned *pi_ffmpeg_codec, const char **ppsz_name );
-int GetVlcFourcc( unsigned i_ffmpeg_codec, int *pi_cat,
- vlc_fourcc_t *pi_fourcc, const char **ppsz_name );
+vlc_fourcc_t GetVlcFourcc( unsigned i_ffmpeg_codec );
vlc_fourcc_t GetVlcAudioFormat( int i_sample_fmt );
/* Video encoder module */
diff --git a/modules/codec/avcodec/fourcc.c b/modules/codec/avcodec/fourcc.c
index 81e0357c05..278ba47712 100644
--- a/modules/codec/avcodec/fourcc.c
+++ b/modules/codec/avcodec/fourcc.c
@@ -508,19 +508,12 @@ int GetFfmpegCodec( vlc_fourcc_t i_fourcc, int *pi_cat,
return false;
}
-int GetVlcFourcc( unsigned i_ffmpeg_codec, int *pi_cat,
- vlc_fourcc_t *pi_fourcc, const char **ppsz_name )
+vlc_fourcc_t GetVlcFourcc( unsigned i_ffmpeg_codec )
{
for( unsigned i = 0; i < codecs_count; i++ )
{
if( codecs_table[i].i_codec == i_ffmpeg_codec )
- {
- if( pi_cat ) *pi_cat = codecs_table[i].i_cat;
- if( pi_fourcc ) *pi_fourcc = codecs_table[i].i_fourcc;
- if( ppsz_name ) *ppsz_name = vlc_fourcc_GetDescription( codecs_table[i].i_cat, codecs_table[i].i_fourcc );
-
- return true;
- }
+ return codecs_table[i].i_fourcc;
}
- return false;
+ return 0;
}
diff --git a/modules/demux/avformat/demux.c b/modules/demux/avformat/demux.c
index 1dd0976ee3..7b00c78112 100644
--- a/modules/demux/avformat/demux.c
+++ b/modules/demux/avformat/demux.c
@@ -373,10 +373,9 @@ int OpenDemux( vlc_object_t *p_this )
const AVCodecParameters *cp = s->codecpar;
es_out_id_t *es = NULL;
es_format_t fmt;
- vlc_fourcc_t fcc;
const char *psz_type = "unknown";
-
- if( !GetVlcFourcc( cp->codec_id, NULL, &fcc, NULL ) )
+ vlc_fourcc_t fcc = GetVlcFourcc( cp->codec_id );
+ if( !fcc )
fcc = VLC_FOURCC( 'u', 'n', 'd', 'f' );
#if LIBAVFORMAT_VERSION_INT >= ((54<<16)+(2<<8)+0)
More information about the vlc-commits
mailing list