mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2025-07-04 00:36:01 +00:00
Don't print error if zero samples are decoded
This commit is contained in:
parent
f16dc469af
commit
c3325a8887
@ -203,7 +203,7 @@ static void omx_renderer_decode_and_play_sample(char* data, int length) {
|
|||||||
if (r != OMX_ErrorNone) {
|
if (r != OMX_ErrorNone) {
|
||||||
fprintf(stderr, "Empty buffer error\n");
|
fprintf(stderr, "Empty buffer error\n");
|
||||||
}
|
}
|
||||||
} else {
|
} else if (decodeLen < 0) {
|
||||||
printf("Opus error from decode: %d\n", decodeLen);
|
printf("Opus error from decode: %d\n", decodeLen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -101,7 +101,7 @@ static void pulse_renderer_decode_and_play_sample(char* data, int length) {
|
|||||||
|
|
||||||
if (rc<0)
|
if (rc<0)
|
||||||
printf("Pulseaudio error: %s\n", pa_strerror(error));
|
printf("Pulseaudio error: %s\n", pa_strerror(error));
|
||||||
} else {
|
} else if (decodeLen < 0) {
|
||||||
printf("Opus error from decode: %d\n", decodeLen);
|
printf("Opus error from decode: %d\n", decodeLen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ static void sdl_renderer_decode_and_play_sample(char* data, int length) {
|
|||||||
int decodeLen = opus_multistream_decode(decoder, data, length, pcmBuffer, samplesPerFrame, 0);
|
int decodeLen = opus_multistream_decode(decoder, data, length, pcmBuffer, samplesPerFrame, 0);
|
||||||
if (decodeLen > 0) {
|
if (decodeLen > 0) {
|
||||||
SDL_QueueAudio(dev, pcmBuffer, decodeLen * channelCount * sizeof(short));
|
SDL_QueueAudio(dev, pcmBuffer, decodeLen * channelCount * sizeof(short));
|
||||||
} else {
|
} else if (decodeLen < 0) {
|
||||||
printf("Opus error from decode: %d\n", decodeLen);
|
printf("Opus error from decode: %d\n", decodeLen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user