[FFmpeg-devel] sdp.c and CONFIG_RTP_MUXER

Diego Biurrun diego
Sun Jul 29 20:12:29 CEST 2007


Don't top-post.

On Sat, Jul 28, 2007 at 08:19:59PM +0200, Matthias Schneider wrote:
> 
> --- Diego Biurrun <diego at biurrun.de> schrieb:
> 
> > On Sat, Jul 28, 2007 at 02:34:45PM +0200, Matthias Schneider wrote:
> > > compiling ffmpeg and having some muxers disabled lead to a problem
> > > with the newly introduced sdp.c (rtp_get_payload_type wasn't found
> > > when linking since CONFIG_RTP_MUXER was set to 0). The enclosed patch
> > > should fix that issue.
> > 
> > Unreproducible.
> > 
> > Provide exact instructions to reproduce the compilation failure.  "some
> > muxers" is useless information, we need details here, not guesswork.
> > 
> here the exact configure line:
> ./configure --disable-muxers --enable-muxer=h264 --enable-muxer=mpeg4 --disable-ffserver
> --enable-shared
> 
> (some muxer thus refers to all muxers disabled except h264 and mpeg4)
> 
> A "make" leads to the following error:
> 
> ...
> 
> ln -sf libavformat.so.51 libavformat.so
> make[1]: Leaving directory `/usr/src/ffmpeg/libavformat'
> touch .libs
> gcc -L"/usr/src/ffmpeg"/libavformat -L"/usr/src/ffmpeg"/libavcodec -L"/usr/src/ffmpeg"/libavutil
> -rdynamic -export-dynamic -Wl,--warn-common -Wl,--as-needed
> -Wl,-rpath-link,"/usr/src/ffmpeg"/libavcodec -Wl,-rpath-link,"/usr/src/ffmpeg"/libavformat
> -Wl,-rpath-link,"/usr/src/ffmpeg"/libavutil -g -o ffmpeg_g ffmpeg.o cmdutils.o -lavformat
> -lavcodec -lavutil -lm -lz -ldl
> gcc -L"/usr/src/ffmpeg"/libavformat -L"/usr/src/ffmpeg"/libavcodec -L"/usr/src/ffmpeg"/libavutil
> -rdynamic -export-dynamic -Wl,--warn-common -Wl,--as-needed
> -Wl,-rpath-link,"/usr/src/ffmpeg"/libavcodec -Wl,-rpath-link,"/usr/src/ffmpeg"/libavformat
> -Wl,-rpath-link,"/usr/src/ffmpeg"/libavutil -g -o ffplay_g ffplay.o cmdutils.o -lavformat
> -lavcodec -lavutil -lm -lz -ldl   -L/usr/lib -lSDL
> /usr/src/ffmpeg/libavformat/libavformat.so: undefined reference to `rtp_get_payload_type'
> collect2: ld returned 1 exit status
> make: *** [ffmpeg_g] Error 1
> make: *** Waiting for unfinished jobs....
> /usr/src/ffmpeg/libavformat/libavformat.so: undefined reference to `rtp_get_payload_type'
> collect2: ld returned 1 exit status
> make: *** [ffplay_g] Error 1
> 
> The problem is that in rtp.c some parts are conditionally compiled if CONFIG_RTP_MUXER is defined.
> In sdp.c however the function rtp_get_payload_type is referenced regardless of that define...

OK, I can reproduce the problem now.  However, your solution - framing
the file in one #ifdef - is not pretty at all.  Instead, sdp.c should be
conditionally compiled.  I'm not sure what the condition should be,
though, since the only non-static function in that file, avf_sdp_create,
is not used anywhere.

So what is sdp.c good for?

Diego




More information about the ffmpeg-devel mailing list