fftools/ffmpeg_demux: ensure tile grid stream groups are sane

This is already checked in libavformat, at least in the only demuxer that
creates them, but best not risk an out-of-bounds access in case a new demuxer
doesn't take the proper measures.

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer
2026-06-13 21:47:10 -03:00
parent 3d2c02f1dd
commit e772f50a65
+5
View File
@@ -1801,6 +1801,11 @@ static int istg_parse_tile_grid(const OptionsContext *o, Demuxer *d, InputStream
if (tg->nb_tiles == 1)
return 0;
if (!tg->nb_tiles) {
av_log(istg, AV_LOG_FATAL, "A demuxer exported an invalid tile group stream group. "
"This is a bug, please report it.\n");
return AVERROR_BUG;
}
memset(&opts, 0, sizeof(opts));