1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

examples/muxing: use S16 sample_fmt for resample src regardless of codec sample_fmt

We generate S16 samples and we should allocate the right buffer

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Ilya Basin 2013-12-16 13:08:03 +04:00 committed by Michael Niedermayer
parent b6714fa077
commit 7d1d0b3ecf

View File

@ -157,7 +157,7 @@ static void open_audio(AVFormatContext *oc, AVCodec *codec, AVStream *st)
10000 : c->frame_size; 10000 : c->frame_size;
ret = av_samples_alloc_array_and_samples(&src_samples_data, &src_samples_linesize, c->channels, ret = av_samples_alloc_array_and_samples(&src_samples_data, &src_samples_linesize, c->channels,
src_nb_samples, c->sample_fmt, 0); src_nb_samples, AV_SAMPLE_FMT_S16, 0);
if (ret < 0) { if (ret < 0) {
fprintf(stderr, "Could not allocate source samples\n"); fprintf(stderr, "Could not allocate source samples\n");
exit(1); exit(1);