Showing the changes to doc/examples/decoding_encoding.c (1 of 1 file). Show all
Unified · Split
| @@ -29,6 +29,7 @@ · 28 unmodified lines | |||
| 29 | * format handling | 29 | * format handling |
| 30 | */ | 30 | */ |
| 31 | 31 | ||
| 32 | #include "libavutil/opt.h" | ||
| 32 | #include "libavcodec/avcodec.h" | 33 | #include "libavcodec/avcodec.h" |
| 33 | #include "libavutil/mathematics.h" | 34 | #include "libavutil/mathematics.h" |
| 34 | 35 | ||
| @@ -224,6 +225,8 @@ static void video_encode_example(const char *filename) · 189 unmodified lines | |||
| 224 | c->max_b_frames=1; | 225 | c->max_b_frames=1; |
| 225 | c->pix_fmt = PIX_FMT_YUV420P; | 226 | c->pix_fmt = PIX_FMT_YUV420P; |
| 226 | 227 | ||
| 228 | av_opt_set(c->priv_data, "preset", "slow", 0); | ||
| 229 | |||
| 227 | /* open it */ | 230 | /* open it */ |
| 228 | if (avcodec_open(c, codec) < 0) { | 231 | if (avcodec_open(c, codec) < 0) { |
| 229 | fprintf(stderr, "could not open codec\n"); | 232 | fprintf(stderr, "could not open codec\n"); |