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
7070 c->sample_fmt = AV_SAMPLE_FMT_S16;
7171
7272 /* open it */
73− if (avcodec_open(c, codec) < 0) {
73+ if (avcodec_open2(c, codec, NULL) < 0) {
7474 fprintf(stderr, "could not open codec\n");
7575 exit(1);
7676 }
@@ -135,7 +135,7 @@ static void audio_decode_example(const char *outfilename, const char *filename) · 58 unmodified lines
135135 c = avcodec_alloc_context3(codec);
136136
137137 /* open it */
138− if (avcodec_open(c, codec) < 0) {
138+ if (avcodec_open2(c, codec, NULL) < 0) {
139139 fprintf(stderr, "could not open codec\n");
140140 exit(1);
141141 }
@@ -243,7 +243,7 @@ static void video_encode_example(const char *filename, int codec_id) · 101 unmodified lines
243243 av_opt_set(c->priv_data, "preset", "slow", 0);
244244
245245 /* open it */
246− if (avcodec_open(c, codec) < 0) {
246+ if (avcodec_open2(c, codec, NULL) < 0) {
247247 fprintf(stderr, "could not open codec\n");
248248 exit(1);
249249 }
@@ -366,7 +366,7 @@ static void video_decode_example(const char *outfilename, const char *filename) · 116 unmodified lines
366366 available in the bitstream. */
367367
368368 /* open it */
369− if (avcodec_open(c, codec) < 0) {
369+ if (avcodec_open2(c, codec, NULL) < 0) {
370370 fprintf(stderr, "could not open codec\n");
371371 exit(1);
372372 }

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