mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-02 15:47:31 +08:00
Fixed bug #7467 - testautomation_audio currently fails because of invalid src/dst rate
This commit is contained in:
@@ -1073,6 +1073,16 @@ SDL_CreateAudioStream(SDL_AudioFormat src_format,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (src_rate <= 0) {
|
||||||
|
SDL_InvalidParamError("src_rate");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dst_rate <= 0) {
|
||||||
|
SDL_InvalidParamError("dst_rate");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
retval = (SDL_AudioStream *)SDL_calloc(1, sizeof(SDL_AudioStream));
|
retval = (SDL_AudioStream *)SDL_calloc(1, sizeof(SDL_AudioStream));
|
||||||
if (retval == NULL) {
|
if (retval == NULL) {
|
||||||
SDL_OutOfMemory();
|
SDL_OutOfMemory();
|
||||||
|
|||||||
Reference in New Issue
Block a user