Skip to content

Commit

Permalink
producer_avformat: Reindent
Browse files Browse the repository at this point in the history
  • Loading branch information
Tjoppen authored and ddennedy committed Jun 11, 2024
1 parent 8b86000 commit 15a46c9
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions src/modules/avformat/producer_avformat.c
Original file line number Diff line number Diff line change
Expand Up @@ -3690,28 +3690,28 @@ static int pick_audio_stream(producer_avformat self)

// Are both audio_index != all and astream != all?
if (absolute_index == -1) {
if (context && mlt_properties_get(properties, "astream")) {
// Get the relative stream index
absolute_index = absolute_stream_index(context,
AVMEDIA_TYPE_AUDIO,
mlt_properties_get_int(properties, "astream"));
} else {
// Failover to the absolute index
absolute_index = mlt_properties_get_int(properties, "audio_index");
if (context) {
// Compute the relative stream index
mlt_properties_set_int(properties,
"astream",
relative_stream_index(context,
AVMEDIA_TYPE_AUDIO,
absolute_index));
if (context && mlt_properties_get(properties, "astream")) {
// Get the relative stream index
absolute_index = absolute_stream_index(context,
AVMEDIA_TYPE_AUDIO,
mlt_properties_get_int(properties, "astream"));
} else {
// Failover to the absolute index
absolute_index = mlt_properties_get_int(properties, "audio_index");
if (context) {
// Compute the relative stream index
mlt_properties_set_int(properties,
"astream",
relative_stream_index(context,
AVMEDIA_TYPE_AUDIO,
absolute_index));
}
}
if (mlt_properties_get_int(properties, "audio_index") != absolute_index) {
// Update the absolute index
mlt_properties_set_int(properties, "audio_index", absolute_index);
self->audio_index = absolute_index;
}
}
if (mlt_properties_get_int(properties, "audio_index") != absolute_index) {
// Update the absolute index
mlt_properties_set_int(properties, "audio_index", absolute_index);
self->audio_index = absolute_index;
}
}

// Exception handling for audio_index
Expand Down

0 comments on commit 15a46c9

Please sign in to comment.