summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-02-20 00:47:46 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-02-20 01:29:30 +0100
commitbe2e211dce2964f922e5dee54a7569ebd6efb0da (patch)
treea1b6e3a9f5b577230d8c9c2b5b5bcba289ee79f5 /doc
parentf4f386dd00e594dc90eb32ae872ae8e22b08d179 (diff)
parent6b8b0fe2bc57fdd606074e52ba73cd9b3d95e644 (diff)
downloadffmpeg-streaming-be2e211dce2964f922e5dee54a7569ebd6efb0da.zip
ffmpeg-streaming-be2e211dce2964f922e5dee54a7569ebd6efb0da.tar.gz
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 Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/decoding_encoding.c8
-rw-r--r--doc/examples/muxing.c6
2 files changed, 7 insertions, 7 deletions
diff --git a/doc/examples/decoding_encoding.c b/doc/examples/decoding_encoding.c
index 3ac701f..255be70 100644
--- a/doc/examples/decoding_encoding.c
+++ b/doc/examples/decoding_encoding.c
@@ -70,7 +70,7 @@ static void audio_encode_example(const char *filename)
c->sample_fmt = AV_SAMPLE_FMT_S16;
/* open it */
- if (avcodec_open(c, codec) < 0) {
+ if (avcodec_open2(c, codec, NULL) < 0) {
fprintf(stderr, "could not open codec\n");
exit(1);
}
@@ -135,7 +135,7 @@ static void audio_decode_example(const char *outfilename, const char *filename)
c = avcodec_alloc_context3(codec);
/* open it */
- if (avcodec_open(c, codec) < 0) {
+ if (avcodec_open2(c, codec, NULL) < 0) {
fprintf(stderr, "could not open codec\n");
exit(1);
}
@@ -243,7 +243,7 @@ static void video_encode_example(const char *filename, int codec_id)
av_opt_set(c->priv_data, "preset", "slow", 0);
/* open it */
- if (avcodec_open(c, codec) < 0) {
+ if (avcodec_open2(c, codec, NULL) < 0) {
fprintf(stderr, "could not open codec\n");
exit(1);
}
@@ -366,7 +366,7 @@ static void video_decode_example(const char *outfilename, const char *filename)
available in the bitstream. */
/* open it */
- if (avcodec_open(c, codec) < 0) {
+ if (avcodec_open2(c, codec, NULL) < 0) {
fprintf(stderr, "could not open codec\n");
exit(1);
}
diff --git a/doc/examples/muxing.c b/doc/examples/muxing.c
index e9add2d..8070ea4 100644
--- a/doc/examples/muxing.c
+++ b/doc/examples/muxing.c
@@ -103,7 +103,7 @@ static void open_audio(AVFormatContext *oc, AVStream *st)
}
/* open it */
- if (avcodec_open(c, codec) < 0) {
+ if (avcodec_open2(c, codec, NULL) < 0) {
fprintf(stderr, "could not open codec\n");
exit(1);
}
@@ -164,7 +164,7 @@ static void write_audio_frame(AVFormatContext *oc, AVStream *st)
get_audio_frame(samples, audio_input_frame_size, c->channels);
- pkt.size = avcodec_encode_audio(c, audio_outbuf, audio_outbuf_size, samples);
+ pkt.size = avcodec_encode_audio2(c, audio_outbuf, audio_outbuf_size, samples);
if (c->coded_frame && c->coded_frame->pts != AV_NOPTS_VALUE)
pkt.pts= av_rescale_q(c->coded_frame->pts, c->time_base, st->time_base);
@@ -284,7 +284,7 @@ static void open_video(AVFormatContext *oc, AVStream *st)
}
/* open the codec */
- if (avcodec_open(c, codec) < 0) {
+ if (avcodec_open2(c, codec, NULL) < 0) {
fprintf(stderr, "could not open codec\n");
exit(1);
}
OpenPOWER on IntegriCloud