[FFmpeg-devel] sdp.c and CONFIG_RTP_MUXER

Thijs Vermeir thijsvermeir
Tue Jul 31 10:54:25 CEST 2007


Hi

On 7/31/07, Luca Abeni <lucabe72 at email.it> wrote:
> Hi all,
>
>
> 2) fix-compilation-with-sdp-1.diff changes avf_sdp_create() to return
> NULL (and not to use rtp_get_payload_type()) if the RTP muxer is not
> configured. After applying this patch, the code must be reindented in a
> second commit.
>

Index: libavformat/sdp.c
===================================================================
--- libavformat/sdp.c	(revision 9837)
+++ libavformat/sdp.c	(working copy)
@@ -171,6 +171,7 @@
 #define SDP_BUFFER_SIZE 2048
 char *avf_sdp_create(AVFormatContext *ac[], int n_files)
 {
+    if (ENABLE_RTP_MUXER) {
     char *buff;
     struct sdp_session_level s;
     int i, j, port, ttl;
@@ -214,4 +215,7 @@
     }

     return buff;
+    } else {
+    return NULL;
+    }
 }

The code in the avf_sdp_create is always compiled ... isn't it better to use ?
#ifdef ENABLE_RTP_MUXER
{
 ...
}
#else
  return NULL;
#endif

Gr,
Thijs




More information about the ffmpeg-devel mailing list