aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMarth64 <marth64@proxyid.net>2024-10-12 12:18:30 -0500
committerMarth64 <marth64@proxyid.net>2024-11-20 23:36:13 -0600
commit3528bfed450842a991df6e076fe72d4c2eee6432 (patch)
tree5909da98d2c9d012582b688f99df0866c35640a3 /libavformat
parentbe784e95ac5cd720fb0da0f13841b0fdf4f90391 (diff)
downloadffmpeg-3528bfed450842a991df6e076fe72d4c2eee6432.tar.gz
avformat/smoothstreamingenc: check return value of avcodec_parameters_copy()
Written in the dominant style of the surrounding code block. Reviewed-by: ePirat <epirat07@gmail.com> Signed-off-by: Marth64 <marth64@proxyid.net>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/smoothstreamingenc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/smoothstreamingenc.c b/libavformat/smoothstreamingenc.c
index 9547419d31..adf3008003 100644
--- a/libavformat/smoothstreamingenc.c
+++ b/libavformat/smoothstreamingenc.c
@@ -331,7 +331,9 @@ static int ism_write_header(AVFormatContext *s)
if (!(st = avformat_new_stream(ctx, NULL))) {
return AVERROR(ENOMEM);
}
- avcodec_parameters_copy(st->codecpar, s->streams[i]->codecpar);
+ if ((ret = avcodec_parameters_copy(st->codecpar, s->streams[i]->codecpar)) < 0) {
+ return ret;
+ }
st->sample_aspect_ratio = s->streams[i]->sample_aspect_ratio;
st->time_base = s->streams[i]->time_base;