From 98140abe85a3588fb9e49c8438e27e43f8802e03 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 17 Oct 2011 20:22:45 +0200 Subject: [PATCH] examples/decoding_encoding.c: set a codec private option to demonstrate how to do that Signed-off-by: Michael Niedermayer --- doc/examples/decoding_encoding.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/examples/decoding_encoding.c b/doc/examples/decoding_encoding.c index aedf5a46b2..213b8ec63b 100644 --- a/doc/examples/decoding_encoding.c +++ b/doc/examples/decoding_encoding.c @@ -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");