Use exact-width integer types
This commit is contained in:
parent
42fb947780
commit
10f60054ac
@ -342,12 +342,12 @@ sc_audio_player_frame_sink_open(struct sc_frame_sink *sink,
|
|||||||
const AVCodecContext *ctx) {
|
const AVCodecContext *ctx) {
|
||||||
struct sc_audio_player *ap = DOWNCAST(sink);
|
struct sc_audio_player *ap = DOWNCAST(sink);
|
||||||
#ifdef SCRCPY_LAVU_HAS_CHLAYOUT
|
#ifdef SCRCPY_LAVU_HAS_CHLAYOUT
|
||||||
assert(ctx->ch_layout.nb_channels > 0);
|
assert(ctx->ch_layout.nb_channels > 0 && ctx->ch_layout.nb_channels < 256);
|
||||||
unsigned nb_channels = ctx->ch_layout.nb_channels;
|
uint8_t nb_channels = ctx->ch_layout.nb_channels;
|
||||||
#else
|
#else
|
||||||
int tmp = av_get_channel_layout_nb_channels(ctx->channel_layout);
|
int tmp = av_get_channel_layout_nb_channels(ctx->channel_layout);
|
||||||
assert(tmp > 0);
|
assert(tmp > 0 && tmp < 256);
|
||||||
unsigned nb_channels = tmp;
|
uint8_t nb_channels = tmp;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
assert(ctx->sample_rate > 0);
|
assert(ctx->sample_rate > 0);
|
||||||
|
@ -42,7 +42,7 @@ struct sc_audio_player {
|
|||||||
struct SwrContext *swr_ctx;
|
struct SwrContext *swr_ctx;
|
||||||
|
|
||||||
// The sample rate is the same for input and output
|
// The sample rate is the same for input and output
|
||||||
unsigned sample_rate;
|
uint32_t sample_rate;
|
||||||
|
|
||||||
// Target buffer for resampling (only used by the receiver thread)
|
// Target buffer for resampling (only used by the receiver thread)
|
||||||
uint8_t *swr_buf;
|
uint8_t *swr_buf;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user