examples/muxing.c: set sample format for encoding

This is required, or avcodec_open() will abort because of invalid
sample format.
This commit is contained in:
Stefano Sabatini 2011-07-08 10:05:06 +02:00
parent 58257ea29e
commit 26f373988d
1 changed files with 1 additions and 0 deletions

View File

@ -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) {