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
1 changed files with 3 additions and 1 deletions

View File

@ -179,7 +179,9 @@ static int sap_read_header(AVFormatContext *s)
goto fail;
}
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;
}