]> git.pld-linux.org Git - packages/gegl.git/blob - gegl-ffmpeg.patch
- release 8 (by relup.sh)
[packages/gegl.git] / gegl-ffmpeg.patch
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)
5        if (p->enc)
6          avcodec_close (p->enc);
7        if (p->ic)
8 -        av_close_input_file (p->ic);
9 +        avformat_close_input(&p->ic);
10        if (p->lavc_frame)
11          av_free (p->lavc_frame);
12  
13 @@ -216,9 +216,9 @@ decode_frame (GeglOperation *operation,
14              {
15                do
16                  {
17 -                  if (av_read_packet (p->ic, &p->pkt) < 0)
18 +                  if (av_read_frame (p->ic, &p->pkt) < 0)
19                      {
20 -                      fprintf (stderr, "av_read_packet failed for %s\n",
21 +                      fprintf (stderr, "av_read_frame failed for %s\n",
22                                 o->path);
23                        return -1;
24                      }
25 @@ -271,12 +271,12 @@ prepare (GeglOperation *operation)
26        gint err;
27  
28        ff_cleanup (o);
29 -      err = av_open_input_file (&p->ic, o->path, NULL, 0, NULL);
30 +      err = avformat_open_input (&p->ic, o->path, NULL, NULL);
31        if (err < 0)
32          {
33            print_error (o->path, err);
34          }
35 -      err = av_find_stream_info (p->ic);
36 +      err = avformat_find_stream_info (p->ic, NULL);
37        if (err < 0)
38          {
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;
43  
44 -      if (avcodec_open (p->enc, p->codec) < 0)
45 +      if (avcodec_open2 (p->enc, p->codec, NULL) < 0)
46          {
47            g_warning ("error opening codec %s", p->enc->codec->name);
48            return;
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 *
53      }
54  
55    /* open the codec */
56 -  if (avcodec_open (c, codec) < 0)
57 +  if (avcodec_open2 (c, codec, NULL) < 0)
58      {
59        fprintf (stderr, "could not open codec\n");
60        exit (1);
61 @@ -769,26 +769,20 @@ tfile (GeglChantO *self)
62       /*XXX: FOO p->audio_st = add_audio_stream (op, p->oc, p->fmt->audio_codec);*/
63      }
64  
65 -  if (av_set_parameters (p->oc, NULL) < 0)
66 -    {
67 -      fprintf (stderr, "Invalid output format propeters\n%s", "");
68 -      return -1;
69 -    }
70 -
71 -  dump_format (p->oc, 0, self->path, 1);
72 +  av_dump_format (p->oc, 0, self->path, 1);
73  
74    if (p->video_st)
75      open_video (p, p->oc, p->video_st);
76    if (p->audio_st)
77      open_audio (p, p->oc, p->audio_st);
78  
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)
81      {
82        fprintf (stderr, "couldn't open '%s'\n", self->path);
83        return -1;
84      }
85  
86 -  av_write_header (p->oc);
87 +  avformat_write_header (p->oc, NULL);
88  
89    return 0;
90  }
91 @@ -858,7 +852,7 @@ finalize (GObject *object)
92              av_freep (&p->oc->streams[i]);
93            }
94  
95 -        url_fclose (&p->oc->pb);
96 +        avio_close (&p->oc->pb);
97          free (p->oc);
98        }
99        g_free (o->chant_data);
This page took 0.033766 seconds and 3 git commands to generate.