Message ID | 20241012171830.2186547-1-marth64@proxyid.net |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel] avformat/smoothstreamingenc: check return value of avcodec_parameters_copy() | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
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;
Written in the dominant style of the surrounding code block. Signed-off-by: Marth64 <marth64@proxyid.net> --- libavformat/smoothstreamingenc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)