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
29 * format handling29 * 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");

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