mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-29 14:56:07 +00:00
avformat/rtsp: Check that lower transport is handled in one of the if()
Fixes: CID1473554 Uninitialized scalar variable Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
498ce4e8b8
commit
c8200d3825
@ -1578,7 +1578,11 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port,
|
||||
else if (lower_transport == RTSP_LOWER_TRANSPORT_UDP_MULTICAST) {
|
||||
snprintf(transport, sizeof(transport) - 1,
|
||||
"%s/UDP;multicast", trans_pref);
|
||||
} else {
|
||||
err = AVERROR(EINVAL);
|
||||
goto fail; // transport would be uninitialized
|
||||
}
|
||||
|
||||
if (s->oformat) {
|
||||
av_strlcat(transport, ";mode=record", sizeof(transport));
|
||||
} else if (rt->server_type == RTSP_SERVER_REAL ||
|
||||
|
Loading…
Reference in New Issue
Block a user