History

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

Michael Niedermayer committed 15 years ago

Commit 98140ab1 parent 82d9faf1 file · +3 −0Browse files

Showing the changes to doc/examples/decoding_encoding.c (1 of 1 file). Show all

Unified · Split

doc/examples/decoding_encoding.c+3−0
@@ -29,6 +29,7 @@ · 28 unmodified lines
2929 * format handling
3030 */
3131
32+#include "libavutil/opt.h"
3233 #include "libavcodec/avcodec.h"
3334 #include "libavutil/mathematics.h"
3435
@@ -224,6 +225,8 @@ static void video_encode_example(const char *filename) · 189 unmodified lines
224225 c->max_b_frames=1;
225226 c->pix_fmt = PIX_FMT_YUV420P;
226227
228+ av_opt_set(c->priv_data, "preset", "slow", 0);
229+
227230 /* open it */
228231 if (avcodec_open(c, codec) < 0) {
229232 fprintf(stderr, "could not open codec\n");

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t