[FFmpeg-cvslog] examples/muxing.c: set sample format for encoding

Stefano Sabatini git at videolan.org
Sat Jul 9 15:31:30 CEST 2011


ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala at poste.it> | Fri Jul  8 10:05:06 2011 +0200| [26f373988d61fbdf140b6d34125e195ec95bcb58] | committer: Stefano Sabatini

examples/muxing.c: set sample format for encoding

This is required, or avcodec_open() will abort because of invalid
sample format.

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

 doc/examples/encoding.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/doc/examples/encoding.c b/doc/examples/encoding.c
index afe7e4f..8588d72 100644
--- a/doc/examples/encoding.c
+++ b/doc/examples/encoding.c
@@ -71,6 +71,7 @@ static void audio_encode_example(const char *filename)
     c->bit_rate = 64000;
     c->sample_rate = 44100;
     c->channels = 2;
+    c->sample_fmt = AV_SAMPLE_FMT_S16;
 
     /* open it */
     if (avcodec_open(c, codec) < 0) {



More information about the ffmpeg-cvslog mailing list