[FFmpeg-cvslog] examples/decoding_encoding.c: set a codec private option to demonstrate how to do that

Michael Niedermayer git at videolan.org
Mon Oct 17 20:59:34 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Oct 17 20:22:45 2011 +0200| [98140abe85a3588fb9e49c8438e27e43f8802e03] | committer: Michael Niedermayer

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

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=98140abe85a3588fb9e49c8438e27e43f8802e03
---

 doc/examples/decoding_encoding.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/doc/examples/decoding_encoding.c b/doc/examples/decoding_encoding.c
index aedf5a4..213b8ec 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");



More information about the ffmpeg-cvslog mailing list