ffmpeg: remove 32 channel limit from audio_channels_map

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2014-08-15 04:46:24 +02:00
parent 33fefdb449
commit d3a22491c7
3 changed files with 11 additions and 7 deletions

View File

@@ -1478,11 +1478,13 @@ static OutputStream *new_audio_stream(OptionsContext *o, AVFormatContext *oc, in
}
if (!ist || (ist->file_index == map->file_idx && ist->st->index == map->stream_idx)) {
if (ost->audio_channels_mapped < FF_ARRAY_ELEMS(ost->audio_channels_map))
ost->audio_channels_map[ost->audio_channels_mapped++] = map->channel_idx;
else
av_log(NULL, AV_LOG_FATAL, "Max channel mapping for output %d.%d reached\n",
ost->file_index, ost->st->index);
if (av_reallocp_array(&ost->audio_channels_map,
ost->audio_channels_mapped + 1,
sizeof(*ost->audio_channels_map)
) < 0 )
exit_program(1);
ost->audio_channels_map[ost->audio_channels_mapped++] = map->channel_idx;
}
}
}