Wrap receiver state into separate struct

For readability, wrap the state of the receiver in a separate struct
receiver_state.
This commit is contained in:
Romain Vimont
2018-11-11 12:36:08 +01:00
parent e562837c0b
commit 70579dc709
2 changed files with 42 additions and 24 deletions

View File

@@ -15,9 +15,11 @@ struct decoder {
SDL_Thread *thread;
SDL_mutex *mutex;
struct recorder *recorder;
uint64_t next_pts;
uint64_t pts;
int remaining;
struct receiver_state {
uint64_t next_pts;
uint64_t pts;
size_t remaining; // remaining bytes to receive for the current frame
} receiver_state;
};
void decoder_init(struct decoder *decoder, struct frames *frames,