OSDN Git Service

examples/decoding_encoding.c: set a codec private option to demonstrate how to do...
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 17 Oct 2011 18:22:45 +0000 (20:22 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 17 Oct 2011 18:22:45 +0000 (20:22 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
doc/examples/decoding_encoding.c

index aedf5a4..213b8ec 100644 (file)
@@ -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");