1 diff -up operations/external/ff-load.c.ffmpeg operations/external/ff-load.c
2 --- operations/external/ff-load.c.ffmpeg 2012-04-01 08:17:57.000000000 -0300
3 +++ operations/external/ff-load.c 2013-04-21 17:45:01.635916966 -0300
4 @@ -137,7 +137,7 @@ ff_cleanup (GeglChantO *o)
6 avcodec_close (p->enc);
8 - av_close_input_file (p->ic);
9 + avformat_close_input(&p->ic);
11 av_free (p->lavc_frame);
13 @@ -216,9 +216,9 @@ decode_frame (GeglOperation *operation,
17 - if (av_read_packet (p->ic, &p->pkt) < 0)
18 + if (av_read_frame (p->ic, &p->pkt) < 0)
20 - fprintf (stderr, "av_read_packet failed for %s\n",
21 + fprintf (stderr, "av_read_frame failed for %s\n",
25 @@ -271,12 +271,12 @@ prepare (GeglOperation *operation)
29 - err = av_open_input_file (&p->ic, o->path, NULL, 0, NULL);
30 + err = avformat_open_input (&p->ic, o->path, NULL, NULL);
33 print_error (o->path, err);
35 - err = av_find_stream_info (p->ic);
36 + err = avformat_find_stream_info (p->ic, NULL);
39 g_warning ("ff-load: error finding stream info for %s", o->path);
40 @@ -312,7 +312,7 @@ prepare (GeglOperation *operation)
41 if (p->codec->capabilities & CODEC_CAP_TRUNCATED)
42 p->enc->flags |= CODEC_FLAG_TRUNCATED;
44 - if (avcodec_open (p->enc, p->codec) < 0)
45 + if (avcodec_open2 (p->enc, p->codec, NULL) < 0)
47 g_warning ("error opening codec %s", p->enc->codec->name);
49 diff -up operations/workshop/external/ff-save.c.ffmpeg operations/workshop/external/ff-save.c
50 --- operations/workshop/external/ff-save.c.ffmpeg 2012-03-29 17:05:50.000000000 -0300
51 +++ operations/workshop/external/ff-save.c 2013-04-21 17:46:21.347953811 -0300
52 @@ -568,7 +568,7 @@ open_video (Priv * p, AVFormatContext *
56 - if (avcodec_open (c, codec) < 0)
57 + if (avcodec_open2 (c, codec, NULL) < 0)
59 fprintf (stderr, "could not open codec\n");
61 @@ -769,26 +769,20 @@ tfile (GeglChantO *self)
62 /*XXX: FOO p->audio_st = add_audio_stream (op, p->oc, p->fmt->audio_codec);*/
65 - if (av_set_parameters (p->oc, NULL) < 0)
67 - fprintf (stderr, "Invalid output format propeters\n%s", "");
71 - dump_format (p->oc, 0, self->path, 1);
72 + av_dump_format (p->oc, 0, self->path, 1);
75 open_video (p, p->oc, p->video_st);
77 open_audio (p, p->oc, p->audio_st);
79 - if (url_fopen (&p->oc->pb, self->path, URL_WRONLY) < 0)
80 + if (avio_open (&p->oc->pb, self->path, AVIO_FLAG_WRITE) < 0)
82 fprintf (stderr, "couldn't open '%s'\n", self->path);
86 - av_write_header (p->oc);
87 + avformat_write_header (p->oc, NULL);
91 @@ -858,7 +852,7 @@ finalize (GObject *object)
92 av_freep (&p->oc->streams[i]);
95 - url_fclose (&p->oc->pb);
96 + avio_close (&p->oc->pb);
99 g_free (o->chant_data);