Commit 98140abe authored by Michael Niedermayer's avatar Michael Niedermayer

examples/decoding_encoding.c: set a codec private option to demonstrate how to do that

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 82d9fafb
......@@ -29,6 +29,7 @@
* format handling
*/
#include "libavutil/opt.h"
#include "libavcodec/avcodec.h"
#include "libavutil/mathematics.h"
......@@ -224,6 +225,8 @@ static void video_encode_example(const char *filename)
c->max_b_frames=1;
c->pix_fmt = PIX_FMT_YUV420P;
av_opt_set(c->priv_data, "preset", "slow", 0);
/* open it */
if (avcodec_open(c, codec) < 0) {
fprintf(stderr, "could not open codec\n");
......
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