aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/dump.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2025-01-04 00:17:21 -0300
committerJames Almer <jamrial@gmail.com>2025-01-05 00:32:07 -0300
commit2919767750da9acc9042fcc2b8fa3e134cfd16c9 (patch)
tree9db7039ef3339e5d19f18c6dad15fd009e79ef47 /libavformat/dump.c
parentbf0786d9bde6fc16239ebcf68c85fffd34f9d874 (diff)
downloadffmpeg-2919767750da9acc9042fcc2b8fa3e134cfd16c9.tar.gz
Revert "avformat/dump: print only the actual streams in a tile grid group"
Indexes in tile_grid->offsets were fixed in the previous commit, but just in case, make sure to not overread the streams array. Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/dump.c')
-rw-r--r--libavformat/dump.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/libavformat/dump.c b/libavformat/dump.c
index 30102f917e..3db11e010c 100644
--- a/libavformat/dump.c
+++ b/libavformat/dump.c
@@ -788,10 +788,14 @@ static void dump_stream_group(const AVFormatContext *ic, uint8_t *printed,
dump_sidedata(NULL, tile_grid->coded_side_data, tile_grid->nb_coded_side_data,
tile_grid->width, tile_grid->height, (AVRational) {0,1},
" ", AV_LOG_INFO);
- for (int i = 0; i < stg->nb_streams; i++) {
- const AVStream *st = stg->streams[i];
- dump_stream_format(ic, st->index, i, index, is_output, AV_LOG_VERBOSE);
- printed[st->index] = 1;
+ for (int i = 0; i < tile_grid->nb_tiles; i++) {
+ const AVStream *st = NULL;
+ if (tile_grid->offsets[i].idx < stg->nb_streams)
+ st = stg->streams[tile_grid->offsets[i].idx];
+ if (st && !printed[st->index]) {
+ dump_stream_format(ic, st->index, i, index, is_output, AV_LOG_VERBOSE);
+ printed[st->index] = 1;
+ }
}
for (int i = 0; i < stg->nb_streams; i++) {
const AVStream *st = stg->streams[i];