vlc | branch: master | Rémi Denis-Courmont <[email protected]> | Sat Jun 17 17:53:20 2017 +0300| [a45c732721617be23866170956d547c0c243fae4] | committer: Rémi Denis-Courmont
avformat: remove unused GetVlcFourcc() arguments > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a45c732721617be23866170956d547c0c243fae4 --- 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 8e585c12c8..a2c3b54ad9 100644 --- a/modules/codec/avcodec/fourcc.c +++ b/modules/codec/avcodec/fourcc.c @@ -510,19 +510,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) _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
