[FFmpeg-devel] [PATCH] Fix ffserver.c warnings
Måns Rullgård
mans
Mon Mar 8 23:05:42 CET 2010
Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:
> Hi, check attached patch.
>
> I'm not sure which functions should actually be declared outside the
> #ifdef HAVE_AV_CONFIG_H ..
>
> Regards.
> --
> FFmpeg = Free and Faithful Magnificient Programmable Ecstatic Gorilla
>
> From c2b72f940e779271c3c4e81f0ffef95f510e1d3d Mon Sep 17 00:00:00 2001
> From: Stefano Sabatini <stefano.sabatini-lala at poste.it>
> Date: Mon, 8 Mar 2010 20:35:32 +0100
> Subject: [PATCH] Declare ff_url_split(), ff_url_join(), av_match_ext(), and match_ext()
> functions outside the #ifdef HAVE_AV_CONFIG_H block.
> MIME-Version: 1.0
> Content-Type: text/plain; charset=UTF-8
> Content-Transfer-Encoding: 8bit
>
> Fix the warnings:
> ffserver.c: In function 'http_parse_request':
> ffserver.c:1376: warning: implicit declaration of function 'av_match_ext'
> ffserver.c: In function 'rtsp_cmd_describe':
> ffserver.c:2844: warning: implicit declaration of function 'ff_url_split'
> ---
> libavformat/avformat.h | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libavformat/avformat.h b/libavformat/avformat.h
> index eda556e..8e63950 100644
> --- a/libavformat/avformat.h
> +++ b/libavformat/avformat.h
> @@ -1339,6 +1339,8 @@ struct tm *brktimegm(time_t secs, struct tm *tm);
> const char *small_strptime(const char *p, const char *fmt,
> struct tm *dt);
>
> +#endif /* HAVE_AV_CONFIG_H */
> +
> /**
> * Splits a URL string into components. To reassemble components back into
> * a URL, use ff_url_join instead of using snprintf directly.
> @@ -1407,6 +1409,4 @@ attribute_deprecated int match_ext(const char *filename, const char *extensions)
> */
> int av_match_ext(const char *filename, const char *extensions);
>
> -#endif /* HAVE_AV_CONFIG_H */
> -
> #endif /* AVFORMAT_AVFORMAT_H */
I saw someone saying just a day ago that ff_url_split() was not a
public function, and the naming indicates this was the intent too.
I don't know what the networking people want ffserver to use here.
Since the unused and deprecated match_ext() is under ifdef
HAVE_AV_CONFIG_H, it is safe to delete it immediately.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list