History

Merge remote-tracking branch 'qatar/master'

* qatar/master: doxy: remove reference to removed api examples: unbreak compilation ttadec: cosmetics: reindent sunrast: use RLE trigger macro inplace of the hard coded value. sunrastenc: set keyframe flag for the output packet. mpegvideo_enc: switch to encode2(). mpegvideo_enc: force encoding delay of at least 1 frame when low_delay=0 Conflicts: doc/examples/muxing.c

Michael Niedermayer committed 14 years ago

Commit be2e2112 parents f4f386d 6b8b0fe16 files · +75 −46Browse files

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

Unified · Split

doc/examples/decoding_encoding.c+4−4
@@ -70,7 +70,7 @@ static void audio_encode_example(const char *filename) · 69 unmodified lines
70 c->sample_fmt = AV_SAMPLE_FMT_S16;70 c->sample_fmt = AV_SAMPLE_FMT_S16;
71 71
72 /* open it */72 /* open it */
73 if (avcodec_open(c, codec) < 0) {73 if (avcodec_open2(c, codec, NULL) < 0) {
74 fprintf(stderr, "could not open codec\n");74 fprintf(stderr, "could not open codec\n");
75 exit(1);75 exit(1);
76 }76 }
@@ -135,7 +135,7 @@ static void audio_decode_example(const char *outfilename, const char *filename) · 58 unmodified lines
135 c = avcodec_alloc_context3(codec);135 c = avcodec_alloc_context3(codec);
136 136
137 /* open it */137 /* open it */
138 if (avcodec_open(c, codec) < 0) {138 if (avcodec_open2(c, codec, NULL) < 0) {
139 fprintf(stderr, "could not open codec\n");139 fprintf(stderr, "could not open codec\n");
140 exit(1);140 exit(1);
141 }141 }
@@ -243,7 +243,7 @@ static void video_encode_example(const char *filename, int codec_id) · 101 unmodified lines
243 av_opt_set(c->priv_data, "preset", "slow", 0);243 av_opt_set(c->priv_data, "preset", "slow", 0);
244 244
245 /* open it */245 /* open it */
246 if (avcodec_open(c, codec) < 0) {246 if (avcodec_open2(c, codec, NULL) < 0) {
247 fprintf(stderr, "could not open codec\n");247 fprintf(stderr, "could not open codec\n");
248 exit(1);248 exit(1);
249 }249 }
@@ -366,7 +366,7 @@ static void video_decode_example(const char *outfilename, const char *filename) · 116 unmodified lines
366 available in the bitstream. */366 available in the bitstream. */
367 367
368 /* open it */368 /* open it */
369 if (avcodec_open(c, codec) < 0) {369 if (avcodec_open2(c, codec, NULL) < 0) {
370 fprintf(stderr, "could not open codec\n");370 fprintf(stderr, "could not open codec\n");
371 exit(1);371 exit(1);
372 }372 }

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