aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-10-17 20:22:45 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-10-17 20:22:45 +0200
commit98140abe85a3588fb9e49c8438e27e43f8802e03 (patch)
treee9728201e09aae6ada8a024f780b049b446d904d /doc/examples
parent82d9fafbb80ee561baa49e8593d2850aa8197459 (diff)
downloadffmpeg-98140abe85a3588fb9e49c8438e27e43f8802e03.tar.gz
examples/decoding_encoding.c: set a codec private option to demonstrate how to do that
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'doc/examples')
-rw-r--r--doc/examples/decoding_encoding.c3
1 files changed, 3 insertions, 0 deletions
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");