diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-07-08 10:05:06 +0200 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-07-09 15:26:09 +0200 |
commit | 26f373988d61fbdf140b6d34125e195ec95bcb58 (patch) | |
tree | ca206d81c002ac2bce75f0340b8197ae4d9d46da | |
parent | 58257ea29e0716a50dc742959de876606ed22416 (diff) | |
download | ffmpeg-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.c | 1 |
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) { |