Commit 26f37398 authored by Stefano Sabatini's avatar Stefano Sabatini

examples/muxing.c: set sample format for encoding

This is required, or avcodec_open() will abort because of invalid
sample format.
parent 58257ea2
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment