aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2011-07-08 10:05:06 +0200
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2011-07-09 15:26:09 +0200
commit26f373988d61fbdf140b6d34125e195ec95bcb58 (patch)
treeca206d81c002ac2bce75f0340b8197ae4d9d46da
parent58257ea29e0716a50dc742959de876606ed22416 (diff)
downloadffmpeg-26f373988d61fbdf140b6d34125e195ec95bcb58.tar.gz
examples/muxing.c: set sample format for encoding
This is required, or avcodec_open() will abort because of invalid sample format.
-rw-r--r--doc/examples/encoding.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/doc/examples/encoding.c b/doc/examples/encoding.c
index afe7e4f277..8588d724a5 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) {