[FFmpeg-cvslog] examples/muxing: use S16 sample_fmt for resample src regardless of codec sample_fmt

Ilya Basin git at videolan.org
Sat Dec 21 12:33:53 CET 2013


ffmpeg | branch: master | Ilya Basin <basinilya at gmail.com> | Mon Dec 16 13:08:03 2013 +0400| [7d1d0b3ecf98d178bc93dd1a4e75614abea1cd67] | committer: Michael Niedermayer

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 at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7d1d0b3ecf98d178bc93dd1a4e75614abea1cd67
---

 doc/examples/muxing.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/examples/muxing.c b/doc/examples/muxing.c
index 5f716c2..d6e0256 100644
--- a/doc/examples/muxing.c
+++ b/doc/examples/muxing.c
@@ -157,7 +157,7 @@ static void open_audio(AVFormatContext *oc, AVCodec *codec, AVStream *st)
         10000 : c->frame_size;
 
     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) {
         fprintf(stderr, "Could not allocate source samples\n");
         exit(1);



More information about the ffmpeg-cvslog mailing list