diff options
author | Chris Robinson <[email protected]> | 2014-11-07 04:50:16 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-11-07 04:50:16 -0800 |
commit | 01a1e6f102d2a3c49b306db41609b8a673ff1813 (patch) | |
tree | 4766efa2f7ef6c4995737801d381a7807335b9c0 /examples/alffplay.c | |
parent | 3f7cb8392ea8b75754e5292f75fdfe50168ffc8e (diff) |
Fallback to 16-bit samples in alffmpeg if a float32 format isn't supported
Diffstat (limited to 'examples/alffplay.c')
-rw-r--r-- | examples/alffplay.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/alffplay.c b/examples/alffplay.c index 609d4146..25128d68 100644 --- a/examples/alffplay.c +++ b/examples/alffplay.c @@ -595,9 +595,9 @@ static int audio_thread(void *userdata) movState->audio.format = AL_FORMAT_STEREO8; } } - else if((movState->audio.st->codec->sample_fmt == AV_SAMPLE_FMT_FLT || - movState->audio.st->codec->sample_fmt == AV_SAMPLE_FMT_FLTP) && - alIsExtensionPresent("AL_EXT_FLOAT32")) + if((movState->audio.st->codec->sample_fmt == AV_SAMPLE_FMT_FLT || + movState->audio.st->codec->sample_fmt == AV_SAMPLE_FMT_FLTP) && + alIsExtensionPresent("AL_EXT_FLOAT32")) { movState->audio.dst_sample_fmt = AV_SAMPLE_FMT_FLT; movState->audio.frame_size = 4; @@ -631,7 +631,7 @@ static int audio_thread(void *userdata) movState->audio.format = AL_FORMAT_STEREO_FLOAT32; } } - else + if(movState->audio.format == AL_NONE) { movState->audio.dst_sample_fmt = AV_SAMPLE_FMT_S16; movState->audio.frame_size = 2; |