avformat/westwood_vqa: Check ffio_ensure_seekback()

Fixes Coverity issue #1598405.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2024-05-22 06:51:26 +02:00
parent 590fffe6ad
commit 6dc8d4eea8
1 changed files with 3 additions and 1 deletions

View File

@ -201,8 +201,10 @@ static int wsvqa_read_packet(AVFormatContext *s,
/* We need a big seekback buffer because there can be SNxx, VIEW and ZBUF
* chunks (<512 KiB total) in the stream before we read VQFR (<256 KiB) and
* seek back here. */
ffio_ensure_seekback(pb, wsvqa->vqfl_chunk_size + (512 + 256) * 1024);
ret = ffio_ensure_seekback(pb, wsvqa->vqfl_chunk_size + (512 + 256) * 1024);
avio_skip(pb, chunk_size + skip_byte);
if (ret < 0)
return ret;
continue;
} else if ((chunk_type == SND0_TAG) || (chunk_type == SND1_TAG) ||
(chunk_type == SND2_TAG) || (chunk_type == VQFR_TAG)) {