rtsp: Simplify AVOption definitions
authorMartin Storsjö <martin@martin.st>
Thu, 13 Oct 2011 11:00:06 +0000 (14:00 +0300)
committerMartin Storsjö <martin@martin.st>
Mon, 17 Oct 2011 16:57:47 +0000 (19:57 +0300)
Use defines for shortening common parts, omit the .dbl named
initializer (since it's the first element in the union).

Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/rtsp.c

index 49c148c..e4c4c98 100644 (file)
 #define SDP_MAX_SIZE 16384
 #define RECVBUF_SIZE 10 * RTP_MAX_PACKET_LENGTH
 
+#define OFFSET(x) offsetof(RTSPState, x)
+#define DEC AV_OPT_FLAG_DECODING_PARAM
 const AVOption ff_rtsp_options[] = {
-    { "initial_pause",  "Don't start playing the stream immediately", offsetof(RTSPState, initial_pause), AV_OPT_TYPE_INT, {.dbl = 0}, 0, 1, AV_OPT_FLAG_DECODING_PARAM },
+    { "initial_pause",  "Don't start playing the stream immediately", OFFSET(initial_pause), AV_OPT_TYPE_INT, {0}, 0, 1, DEC },
     FF_RTP_FLAG_OPTS(RTSPState, rtp_muxer_flags),
     { NULL },
 };