[gegl] make ff-save compile again with newer ffmpeg



commit ab01faccc73f052687ef1d558c29c8f3a13fc6d7
Author: Ãyvind KolÃs <pippin gimp org>
Date:   Mon Mar 26 17:03:29 2012 +0100

    make ff-save compile again with newer ffmpeg

 operations/workshop/external/ff-save.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/operations/workshop/external/ff-save.c b/operations/workshop/external/ff-save.c
index a06f427..d7313d6 100644
--- a/operations/workshop/external/ff-save.c
+++ b/operations/workshop/external/ff-save.c
@@ -393,7 +393,7 @@ open_audio (Priv * p, 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);
@@ -455,7 +455,7 @@ write_audio_frame (GeglChantO *op, AVFormatContext * oc, AVStream * st)
                                        p->audio_outbuf_size, p->samples);
 
       pkt.pts = c->coded_frame->pts;
-      pkt.flags |= PKT_FLAG_KEY;
+      pkt.flags |= AV_PKT_FLAG_KEY;
       pkt.stream_index = st->index;
       pkt.data = p->audio_outbuf;
 
@@ -496,7 +496,7 @@ add_video_stream (GeglChantO *op, AVFormatContext * oc, int codec_id)
 
   c = st->codec;
   c->codec_id = codec_id;
-  c->codec_type = CODEC_TYPE_VIDEO;
+  c->codec_type = AVMEDIA_TYPE_VIDEO;
 
   /* put sample propeters */
   c->bit_rate = op->bitrate;
@@ -689,7 +689,7 @@ write_video_frame (GeglChantO *op,
       AVPacket  pkt;
       av_init_packet (&pkt);
 
-      pkt.flags |= PKT_FLAG_KEY;
+      pkt.flags |= AV_PKT_FLAG_KEY;
       pkt.stream_index = st->index;
       pkt.data = (uint8_t *) picture_ptr;
       pkt.size = sizeof (AVPicture);
@@ -712,7 +712,7 @@ write_video_frame (GeglChantO *op,
 
           pkt.pts = c->coded_frame->pts;
           if (c->coded_frame->key_frame)
-            pkt.flags |= PKT_FLAG_KEY;
+            pkt.flags |= AV_PKT_FLAG_KEY;
           pkt.stream_index = st->index;
           pkt.data = p->video_outbuf;
           pkt.size = out_size;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]