Commit 957d8687 authored by François Cartegnie's avatar François Cartegnie 🤞

demux: mp4: export new channels mapping when reordering

parent c6bd1232
......@@ -969,11 +969,17 @@ int SetupAudioES( demux_t *p_demux, mp4_track_t *p_track, MP4_Box_t *p_sample )
}
}
rgi_chans_sequence[i_channels] = 0;
p_track->b_chans_reorder = !!
aout_CheckChannelReorder( rgi_chans_sequence, NULL, i_vlc_mapping,
p_track->rgi_chans_reordering );
}
if( aout_CheckChannelReorder( rgi_chans_sequence, NULL, i_vlc_mapping,
p_track->rgi_chans_reordering ) &&
aout_BitsPerSample( p_track->fmt.i_codec ) )
{
p_track->b_chans_reorder = true;
p_track->fmt.audio.i_channels = i_channels;
p_track->fmt.audio.i_physical_channels =
p_track->fmt.audio.i_original_channels = i_vlc_mapping;
}
}
}
SetupGlobalExtensions( p_track, p_sample );
......
......@@ -434,7 +434,7 @@ static block_t * MP4_Block_Read( demux_t *p_demux, const mp4_track_t *p_track, i
static void MP4_Block_Send( demux_t *p_demux, mp4_track_t *p_track, block_t *p_block )
{
if ( p_track->b_chans_reorder && aout_BitsPerSample( p_track->fmt.i_codec ) )
if ( p_track->b_chans_reorder )
{
aout_ChannelReorder( p_block->p_buffer, p_block->i_buffer,
p_track->fmt.audio.i_channels,
......
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