Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2012-02-19 13:34:40 +0400
committerLuca Barbato <lu_zero@gentoo.org>2012-02-19 22:10:28 +0400
commitaac63cef209877df62d3631e4d04187b94574136 (patch)
tree4df7ff7ab6499a016de7e409daa62a9c1c2e18be /libavcodec/api-example.c
parente04ca1d4cea98db33020784834f2473e7ac60395 (diff)
examples: unbreak compilation
Update api so it will compile again.
Diffstat (limited to 'libavcodec/api-example.c')
-rw-r--r--libavcodec/api-example.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/libavcodec/api-example.c b/libavcodec/api-example.c
index 970a90eaba..93d6c2253c 100644
--- a/libavcodec/api-example.c
+++ b/libavcodec/api-example.c
@@ -74,7 +74,7 @@ static void audio_encode_example(const char *filename)
c->channels = 2;
/* open it */
- if (avcodec_open(c, codec) < 0) {
+ if (avcodec_open2(c, codec, NULL) < 0) {
fprintf(stderr, "could not open codec\n");
exit(1);
}
@@ -139,7 +139,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);
}
@@ -242,7 +242,7 @@ static void video_encode_example(const char *filename)
c->pix_fmt = PIX_FMT_YUV420P;
/* open it */
- if (avcodec_open(c, codec) < 0) {
+ if (avcodec_open2(c, codec, NULL) < 0) {
fprintf(stderr, "could not open codec\n");
exit(1);
}
@@ -369,7 +369,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);
}
@@ -456,9 +456,6 @@ int main(int argc, char **argv)
{
const char *filename;
- /* must be called before using avcodec lib */
- avcodec_init();
-
/* register all the codecs */
avcodec_register_all();