summaryrefslogtreecommitdiff
blob: 8e9a328524c3e9fd766fc62d942f689c122d89be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
From 97067622352e58f86a24851dacb1f5daa0762897 Mon Sep 17 00:00:00 2001
From: nick black <nick.black@sprezzatech.com>
Date: Fri, 14 Dec 2012 04:11:16 +0000
Subject: port gegl forward to libav 54

---
diff --git a/operations/external/ff-load.c b/operations/external/ff-load.c
index 442ec5f..75d26e9 100644
--- a/operations/external/ff-load.c
+++ b/operations/external/ff-load.c
@@ -137,7 +137,7 @@ ff_cleanup (GeglChantO *o)
       if (p->enc)
         avcodec_close (p->enc);
       if (p->ic)
-        av_close_input_file (p->ic);
+        avformat_close_input(&p->ic);
       if (p->lavc_frame)
         av_free (p->lavc_frame);
 
@@ -216,9 +216,9 @@ decode_frame (GeglOperation *operation,
             {
               do
                 {
-                  if (av_read_packet (p->ic, &p->pkt) < 0)
+                  if (av_read_frame (p->ic, &p->pkt) < 0)
                     {
-                      fprintf (stderr, "av_read_packet failed for %s\n",
+                      fprintf (stderr, "av_read_frame failed for %s\n",
                                o->path);
                       return -1;
                     }
@@ -271,12 +271,12 @@ prepare (GeglOperation *operation)
       gint err;
 
       ff_cleanup (o);
-      err = av_open_input_file (&p->ic, o->path, NULL, 0, NULL);
+      err = avformat_open_input(&p->ic, o->path, NULL, 0);
       if (err < 0)
         {
           print_error (o->path, err);
         }
-      err = av_find_stream_info (p->ic);
+      err = avformat_find_stream_info (p->ic, NULL);
       if (err < 0)
         {
           g_warning ("ff-load: error finding stream info for %s", o->path);
@@ -312,7 +312,7 @@ prepare (GeglOperation *operation)
       if (p->codec->capabilities & CODEC_CAP_TRUNCATED)
         p->enc->flags |= CODEC_FLAG_TRUNCATED;
 
-      if (avcodec_open (p->enc, p->codec) < 0)
+      if (avcodec_open2 (p->enc, p->codec, NULL) < 0)
         {
           g_warning ("error opening codec %s", p->enc->codec->name);
           return;
--
cgit v0.9.1