aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-05-22 10:49:10 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-05-25 13:51:58 +0200
commit50c25d1f0a55dcd7f979e1c27a4b8c26f42ea939 (patch)
treeaea9c91a0e59b2ca7334b6200b6262f7a77d48b1
parent65763bffb6e2a7dbb281e302b7adf7ee7b5330a9 (diff)
downloadffmpeg-50c25d1f0a55dcd7f979e1c27a4b8c26f42ea939.tar.gz
avformat/matroskaenc: Check ff_put_wav_header() failure
Fixes Coverity issue #1506706. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavformat/matroskaenc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 63bae9fe1c..76c542d50b 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -1250,7 +1250,9 @@ static int mkv_assemble_codecprivate(AVFormatContext *s, AVIOContext *dyn_cp,
par->codec_tag = tag;
/* Same comment as for ff_put_bmp_header applies here. */
- ff_put_wav_header(s, dyn_cp, par, FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX);
+ ret = ff_put_wav_header(s, dyn_cp, par, FF_PUT_WAV_HEADER_FORCE_WAVEFORMATEX);
+ if (ret < 0)
+ return ret;
#endif
}