mirror of https://git.ffmpeg.org/ffmpeg.git
examples/decoding_encoding.c: set a codec private option to demonstrate how to do that
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
82d9fafbb8
commit
98140abe85
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue