diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-08-15 04:46:24 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-08-15 05:38:47 +0200 |
commit | d3a22491c736588ee1e94a240bbe9e35bbb8d88a (patch) | |
tree | 82229a017fa4d420a52e4486ae99d928bd117a75 /ffmpeg_opt.c | |
parent | 33fefdb44992bce18acb4548f28c9cd5b31de11f (diff) | |
download | ffmpeg-d3a22491c736588ee1e94a240bbe9e35bbb8d88a.tar.gz |
ffmpeg: remove 32 channel limit from audio_channels_map
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg_opt.c')
-rw-r--r-- | ffmpeg_opt.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c index 1962cf48cb..3cf78f0f79 100644 --- a/ffmpeg_opt.c +++ b/ffmpeg_opt.c @@ -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; } } } |