fftools/ffmpeg: add InputStream.index

This allows to avoid access to the underlying AVStream in many places.
This commit is contained in:
Anton Khirnov
2023-05-19 09:53:57 +02:00
parent cad59cccaf
commit 6abb4a28ef
6 changed files with 15 additions and 12 deletions

View File

@@ -539,7 +539,7 @@ OutputStream *ost_iter(OutputStream *prev)
InputStream *ist_iter(InputStream *prev)
{
int if_idx = prev ? prev->file_index : 0;
int ist_idx = prev ? prev->st->index + 1 : 0;
int ist_idx = prev ? prev->index + 1 : 0;
for (; if_idx < nb_input_files; if_idx++) {
InputFile *f = input_files[if_idx];
@@ -937,7 +937,7 @@ static void print_stream_maps(void)
for (int j = 0; j < ist->nb_filters; j++) {
if (!filtergraph_is_simple(ist->filters[j]->graph)) {
av_log(NULL, AV_LOG_INFO, " Stream #%d:%d (%s) -> %s",
ist->file_index, ist->st->index, ist->dec ? ist->dec->name : "?",
ist->file_index, ist->index, ist->dec ? ist->dec->name : "?",
ist->filters[j]->name);
if (nb_filtergraphs > 1)
av_log(NULL, AV_LOG_INFO, " (graph %d)", ist->filters[j]->graph->index);
@@ -967,7 +967,7 @@ static void print_stream_maps(void)
av_log(NULL, AV_LOG_INFO, " Stream #%d:%d -> #%d:%d",
ost->ist->file_index,
ost->ist->st->index,
ost->ist->index,
ost->file_index,
ost->index);
if (ost->enc_ctx) {