|
|
|
@ -1430,10 +1430,21 @@ static OutputStream *new_audio_stream(OptionsContext *o, AVFormatContext *oc, in |
|
|
|
|
/* check for channel mapping for this audio stream */ |
|
|
|
|
for (n = 0; n < o->nb_audio_channel_maps; n++) { |
|
|
|
|
AudioChannelMap *map = &o->audio_channel_maps[n]; |
|
|
|
|
InputStream *ist = input_streams[ost->source_index]; |
|
|
|
|
if ((map->channel_idx == -1 || (ist->file_index == map->file_idx && ist->st->index == map->stream_idx)) && |
|
|
|
|
(map->ofile_idx == -1 || ost->file_index == map->ofile_idx) && |
|
|
|
|
if ((map->ofile_idx == -1 || ost->file_index == map->ofile_idx) && |
|
|
|
|
(map->ostream_idx == -1 || ost->st->index == map->ostream_idx)) { |
|
|
|
|
InputStream *ist; |
|
|
|
|
|
|
|
|
|
if (map->channel_idx == -1) { |
|
|
|
|
ist = NULL; |
|
|
|
|
} else if (ost->source_index < 0) { |
|
|
|
|
av_log(NULL, AV_LOG_FATAL, "Cannot determine input stream for channel mapping %d.%d\n", |
|
|
|
|
ost->file_index, ost->st->index); |
|
|
|
|
continue; |
|
|
|
|
} else { |
|
|
|
|
ist = input_streams[ost->source_index]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
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 |
|
|
|
@ -1442,6 +1453,7 @@ static OutputStream *new_audio_stream(OptionsContext *o, AVFormatContext *oc, in |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (ost->stream_copy) |
|
|
|
|
check_streamcopy_filters(o, oc, ost, AVMEDIA_TYPE_AUDIO); |
|
|
|
|