From 767ccbb387a462c9bc21aaf22d2c3d3358c147b8 Mon Sep 17 00:00:00 2001 From: iphydf Date: Sun, 12 Aug 2018 14:22:21 +0000 Subject: [PATCH] Avoid forward declaration of rtp structs. Forward declarations are problematic, as they easily allow introducing cyclic dependencies. --- toxav/audio.h | 3 +-- toxav/video.h | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/toxav/audio.h b/toxav/audio.h index 3c646f76..f71aaed3 100644 --- a/toxav/audio.h +++ b/toxav/audio.h @@ -24,6 +24,7 @@ #include "../toxcore/logger.h" #include "../toxcore/util.h" +#include "rtp.h" #include #include @@ -48,8 +49,6 @@ #define AUDIO_MAX_BUFFER_SIZE_PCM16 ((AUDIO_MAX_SAMPLE_RATE * AUDIO_MAX_FRAME_DURATION_MS) / 1000) #define AUDIO_MAX_BUFFER_SIZE_BYTES (AUDIO_MAX_BUFFER_SIZE_PCM16 * 2) -struct RTPMessage; - typedef struct ACSession_s { const Logger *log; diff --git a/toxav/video.h b/toxav/video.h index 19ceb9ba..898c986a 100644 --- a/toxav/video.h +++ b/toxav/video.h @@ -24,6 +24,8 @@ #include "../toxcore/logger.h" #include "../toxcore/util.h" +#include "ring_buffer.h" +#include "rtp.h" #include #include @@ -35,9 +37,6 @@ #include -struct RTPMessage; -struct RingBuffer; - typedef struct VCSession_s { /* encoding */ vpx_codec_ctx_t encoder[1];