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.
Unified · Split
| @@ -1941,12 +1941,15 @@ redirect: · 1940 unmodified lines | |||
| 1941 | break; | 1941 | break; |
| 1942 | } | 1942 | } |
| 1943 | 1943 | ||
| 1944 | if (CONFIG_RTSP_DEMUXER && s->iformat) { | 1944 | #if CONFIG_RTSP_DEMUXER |
| 1945 | if (s->iformat) { | ||
| 1945 | if (rt->server_type == RTSP_SERVER_SATIP) | 1946 | if (rt->server_type == RTSP_SERVER_SATIP) |
| 1946 | err = init_satip_stream(s); | 1947 | err = init_satip_stream(s); |
| 1947 | else | 1948 | else |
| 1948 | err = ff_rtsp_setup_input_streams(s, reply); | 1949 | err = ff_rtsp_setup_input_streams(s, reply); |
| 1949 | } else if (CONFIG_RTSP_MUXER) | 1950 | } else |
| 1951 | #endif | ||
| 1952 | if (CONFIG_RTSP_MUXER) | ||
| 1950 | err = ff_rtsp_setup_output_streams(s, host); | 1953 | err = ff_rtsp_setup_output_streams(s, host); |
| 1951 | else | 1954 | else |
| 1952 | av_assert0(0); | 1955 | av_assert0(0); |