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