[vlc-commits] [Git][videolan/vlc][master] 3 commits: es_out: use EMPTY_STR macro
Steve Lhomme (@robUx4)
gitlab at videolan.org
Fri Feb 3 07:14:09 UTC 2023
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
a13c388c by Francois Cartegnie at 2023-02-03T06:55:29+00:00
es_out: use EMPTY_STR macro
- - - - -
977b8e38 by Francois Cartegnie at 2023-02-03T06:55:29+00:00
es_out: make use of initial es description
- - - - -
d568e3d8 by Francois Cartegnie at 2023-02-03T06:55:29+00:00
es_out: bitrate info is valid for any ES
- - - - -
1 changed file:
- src/input/es_out.c
Changes:
=====================================
src/input/es_out.c
=====================================
@@ -4249,12 +4249,17 @@ static void EsOutUpdateInfo( es_out_t *out, es_out_id_t *es, const vlc_meta_t *p
info_category_AddCodecInfo( p_cat, _("Codec"),
i_codec_fourcc, psz_codec_description );
- if( es->psz_language && *es->psz_language )
+ if( !EMPTY_STR(es->psz_language) )
info_category_AddInfo( p_cat, _("Language"), "%s",
es->psz_language );
- if( fmt->psz_description && *fmt->psz_description )
+ if( !EMPTY_STR(fmt->psz_description) || !EMPTY_STR(p_fmt_es->psz_description) )
info_category_AddInfo( p_cat, _("Description"), "%s",
- fmt->psz_description );
+ EMPTY_STR(fmt->psz_description) ? p_fmt_es->psz_description
+ : fmt->psz_description );
+
+ if( p_fmt_es->i_bitrate > 0 )
+ info_category_AddInfo( p_cat, _("Bitrate"), _("%u kb/s"),
+ p_fmt_es->i_bitrate / 1000 );
switch( fmt->i_cat )
{
@@ -4303,11 +4308,10 @@ static void EsOutUpdateInfo( es_out_t *out, es_out_id_t *es, const vlc_meta_t *p
info_category_AddInfo( p_cat, _("Decoded bits per sample"), "%u",
i_outbps );
- if( fmt->i_bitrate != 0 )
- {
- info_category_AddInfo( p_cat, _("Bitrate"), _("%u kb/s"),
+ if( fmt->i_bitrate > 0 )
+ info_category_AddInfo( p_cat, _("Decoded Bitrate"), _("%u kb/s"),
fmt->i_bitrate / 1000 );
- }
+
for( int i = 0; i < AUDIO_REPLAY_GAIN_MAX; i++ )
{
const audio_replay_gain_t *p_rg = &fmt->audio_replay_gain;
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/2ae5c194b14663fe14eae12ef7941c86e7407862...d568e3d8a4254f3b40ee7af02c1b655d77fe3d0d
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/2ae5c194b14663fe14eae12ef7941c86e7407862...d568e3d8a4254f3b40ee7af02c1b655d77fe3d0d
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list