mirror of https://github.com/Genymobile/scrcpy
Rename HEADER_SIZE to SC_PACKET_HEADER_SIZE
Prefix the constant for consistency.
This commit is contained in:
parent
6fc388f369
commit
044acc2259
|
@ -10,7 +10,7 @@
|
|||
#include "util/buffer_util.h"
|
||||
#include "util/log.h"
|
||||
|
||||
#define HEADER_SIZE 12
|
||||
#define SC_PACKET_HEADER_SIZE 12
|
||||
|
||||
#define SC_PACKET_FLAG_CONFIG (UINT64_C(1) << 63)
|
||||
#define SC_PACKET_FLAG_KEY_FRAME (UINT64_C(1) << 62)
|
||||
|
@ -40,9 +40,9 @@ sc_demuxer_recv_packet(struct sc_demuxer *demuxer, AVPacket *packet) {
|
|||
// | `- config packet
|
||||
// `-- key frame
|
||||
|
||||
uint8_t header[HEADER_SIZE];
|
||||
ssize_t r = net_recv_all(demuxer->socket, header, HEADER_SIZE);
|
||||
if (r < HEADER_SIZE) {
|
||||
uint8_t header[SC_PACKET_HEADER_SIZE];
|
||||
ssize_t r = net_recv_all(demuxer->socket, header, SC_PACKET_HEADER_SIZE);
|
||||
if (r < SC_PACKET_HEADER_SIZE) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue