[Libav-user] FFmpeg + OpenAL - playback streaming sound from video won't work
jan at jdrabner.eu
Mon Jan 27 22:09:52 CET 2014
Okay, I tried using swr_convert, but it always crashes when trying to
divide by 0.
Basically, I have the same problem as those two guys:
However, I DO call swr_init() and there is no error whatsoever.
And it never reaches the point in swr_init() where context->postin would
be set so it HAS to crash there.
Here is the code I use to init and to the swr_convert:
// Init context
SwrContext* swrContext = swr_alloc_set_opts(NULL,
int result = swr_init(swrContext);
int outputSamples = swr_convert(swrContext,
As I said, I receive no errors, but the crash when FFmpeg tries to
divide by 0 inside |swri_realloc_audio|.
What am I doing wrong?
Am 27.01.2014 20:46, schrieb Jan Drabner:
> Well. I don't.
> I was assuming that decode_audio4(...) was already giving output in
> that format. I mean, after decoding, the data has to be in SOME
> format, so I assumed it was a standard format. Possibly a bit naive on
> my part.
> But then again, not a single sample with FFmpeg & OpenAL I found was
> using aresample, so this is the first time I actually hear of it.
> I will try using it now and see how well that goes.
> Am 27.01.2014 20:36, schrieb Carl Eugen Hoyos:
>> Jan Drabner <jan at ...> writes:
>>> However, I cannot get the sound to play at all with OpenAL.
>> Where do you call libswresample or aresample to convert
>> from AV_SAMPLE_FMT_FLTP to AV_SAMPLE_FMT_S16 ?
>> Carl Eugen
>> Libav-user mailing list
>> Libav-user at ffmpeg.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libav-user