[vlc-commits] [Git][videolan/vlc][3.0.x] demux/mpeg: expose ID3v2 metadata via DEMUX_GET_META
Steve Lhomme (@robUx4)
gitlab at videolan.org
Thu Apr 23 13:26:11 UTC 2026
Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC
Commits:
632204a0 by Felix Paul Kühne at 2026-04-22T12:26:51+02:00
demux/mpeg: expose ID3v2 metadata via DEMUX_GET_META
This allows us to show the metadata without involving taglib and
therefore fixing the parsing for access modules where we reject the use
of taglib such as http.
Fixes #19209. Manual, simplified backport of c571ff9c
- - - - -
1 changed file:
- modules/demux/mpeg/es.c
Changes:
=====================================
modules/demux/mpeg/es.c
=====================================
@@ -161,6 +161,8 @@ struct demux_sys_t
float rgf_replay_peak[AUDIO_REPLAY_GAIN_MAX];
sync_table_t mllt;
+
+ vlc_meta_t *p_meta;
};
static int MpgaProbe( demux_t *p_demux, int64_t *pi_offset );
@@ -378,6 +380,8 @@ static void Close( vlc_object_t * p_this )
block_ChainRelease( p_sys->p_packetized_data );
if( p_sys->mllt.p_bits )
free( p_sys->mllt.p_bits );
+ if( p_sys->p_meta )
+ vlc_meta_Delete( p_sys->p_meta );
demux_PacketizerDestroy( p_sys->p_packetizer );
free( p_sys );
}
@@ -399,6 +403,12 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
*pb_bool = true;
return VLC_SUCCESS;
+ case DEMUX_GET_META:
+ if( p_sys->p_meta == NULL )
+ return VLC_EGENERIC;
+ vlc_meta_Merge( va_arg( args, vlc_meta_t * ), p_sys->p_meta );
+ return VLC_SUCCESS;
+
case DEMUX_GET_TIME:
pi64 = va_arg( args, int64_t * );
*pi64 = p_sys->i_pts + p_sys->i_time_offset;
@@ -902,6 +912,11 @@ static int ID3TAG_Parse_Handler( uint32_t i_tag, const uint8_t *p_payload, size_
demux_t *p_demux = (demux_t *) p_priv;
demux_sys_t *p_sys = p_demux->p_sys;
+ if( p_sys->p_meta == NULL )
+ p_sys->p_meta = vlc_meta_New();
+ if( p_sys->p_meta != NULL )
+ ID3HandleTag( p_payload, i_payload, i_tag, p_sys->p_meta, NULL );
+
if( i_tag == VLC_FOURCC('M', 'L', 'L', 'T') )
{
if( i_payload > 20 )
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/632204a0691aa831846fd7fcc1a47f1ff3bd81b0
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/632204a0691aa831846fd7fcc1a47f1ff3bd81b0
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list