[FFmpeg-devel] rtsp.c implicit declaration
Wed Oct 27 02:44:49 CEST 2010
On Tue, 26 Oct 2010, Ronald S. Bultje wrote:
> On Tue, Oct 26, 2010 at 3:29 PM, Reimar D?ffinger
> <Reimar.Doeffinger at gmx.de> wrote:
> > if the RTSP muxer is disabled, compilation fails because
> > rtsp_setup_output_streams is used via an implicit declaration.
> > So either a forward declaration is needed or the #if should
> > be moved inside the function or something like that...
> So the preprocessor doesn't like our if(0) trick? That's bad. Maybe
> just move if (0) -> #if ... then in the caller.
That would work, but would make it a bit uglier at the call site.
I'm planning to move these functions to rtspenc/dec.c later, and then they
will have proper declarations in rtsp.h. I fixed the issue for now by
adding a stub declaration in an #else branch, but all of that uglyness
will be removed once I move them.
More information about the ffmpeg-devel