1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avformat/sapdec: check return value of avcodec_parameters_copy()

Written in the dominant style of the surrounding code block.

Signed-off-by: Marth64 <marth64@proxyid.net>
This commit is contained in:
Marth64 2024-10-12 12:32:12 -05:00
parent a5f0daf843
commit 7332b1700e

View File

@ -179,7 +179,9 @@ static int sap_read_header(AVFormatContext *s)
goto fail; goto fail;
} }
st->id = i; st->id = i;
avcodec_parameters_copy(st->codecpar, sap->sdp_ctx->streams[i]->codecpar); ret = avcodec_parameters_copy(st->codecpar, sap->sdp_ctx->streams[i]->codecpar);
if (ret < 0)
goto fail;
st->time_base = sap->sdp_ctx->streams[i]->time_base; st->time_base = sap->sdp_ctx->streams[i]->time_base;
} }