mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-28 02:12:28 +00:00
avformat/rtsp: Fix build failure when RTP demuxers are disabled
rtsp.c uses a check of the form "if (CONFIG_RTSP_DEMUXER && ...) {}" with the intent to make the code compilable even though the part guarded by this check contains calls to functions that don't exist when the RTSP demuxer is disabled. Yet even then compilers still need a declaration of all the functions in the dead code block and error out if not (due to our usage of -Werror=implicit-function-declaration) and no such declaration exists for a static function in rtsp.c. Simply adding a declaration leads to a "used but never defined" warning, therefore this commit resorts to an #if. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
7936cfc157
commit
e9513052b5
@ -1941,12 +1941,15 @@ redirect:
|
||||
break;
|
||||
}
|
||||
|
||||
if (CONFIG_RTSP_DEMUXER && s->iformat) {
|
||||
#if CONFIG_RTSP_DEMUXER
|
||||
if (s->iformat) {
|
||||
if (rt->server_type == RTSP_SERVER_SATIP)
|
||||
err = init_satip_stream(s);
|
||||
else
|
||||
err = ff_rtsp_setup_input_streams(s, reply);
|
||||
} else if (CONFIG_RTSP_MUXER)
|
||||
} else
|
||||
#endif
|
||||
if (CONFIG_RTSP_MUXER)
|
||||
err = ff_rtsp_setup_output_streams(s, host);
|
||||
else
|
||||
av_assert0(0);
|
||||
|
Loading…
Reference in New Issue
Block a user