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:
parent
b6714fa077
commit
7d1d0b3ecf
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user