[FFmpeg-devel] sdp.c and CONFIG_RTP_MUXER

Luca Abeni lucabe72
Tue Jul 31 11:12:40 CEST 2007


Hi Thijs,

On Tue, 2007-07-31 at 10:54 +0200, Thijs Vermeir wrote:
[...]
>      return buff;
> +    } else {
> +    return NULL;
> +    }
>  }
> 
> The code in the avf_sdp_create is always compiled ...

Yes, but the compiler is smart enough (I think ;-) to understand that
ENABLE_RTP_MUXER is a constant, and is always 0 if the RTP muxer is not
configured in. So, the compiler can discard the reference to
rtp_get_payload_type(), and the linking error disappears (at least, this
is what seems to be happening here).


>  isn't it better to use ?
> #ifdef ENABLE_RTP_MUXER
> {
>  ...
> }
> #else
>   return NULL;
> #endif

This was my first try... It works, but it generates warnings because
some static functions are defined but not used in sdp.c. But I am ok
with this version too, if it is preferred.


			Thanks,
				Luca





More information about the ffmpeg-devel mailing list