gegl-0.2.0-ffmpeg-0.11.diff 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. From 97067622352e58f86a24851dacb1f5daa0762897 Mon Sep 17 00:00:00 2001
  2. From: nick black <nick.black@sprezzatech.com>
  3. Date: Fri, 14 Dec 2012 04:11:16 +0000
  4. Subject: port gegl forward to libav 54
  5. ---
  6. diff --git a/operations/external/ff-load.c b/operations/external/ff-load.c
  7. index 442ec5f..75d26e9 100644
  8. --- a/operations/external/ff-load.c
  9. +++ b/operations/external/ff-load.c
  10. @@ -137,7 +137,7 @@ ff_cleanup (GeglChantO *o)
  11. if (p->enc)
  12. avcodec_close (p->enc);
  13. if (p->ic)
  14. - av_close_input_file (p->ic);
  15. + avformat_close_input(&p->ic);
  16. if (p->lavc_frame)
  17. av_free (p->lavc_frame);
  18. @@ -216,9 +216,9 @@ decode_frame (GeglOperation *operation,
  19. {
  20. do
  21. {
  22. - if (av_read_packet (p->ic, &p->pkt) < 0)
  23. + if (av_read_frame (p->ic, &p->pkt) < 0)
  24. {
  25. - fprintf (stderr, "av_read_packet failed for %s\n",
  26. + fprintf (stderr, "av_read_frame failed for %s\n",
  27. o->path);
  28. return -1;
  29. }
  30. @@ -271,12 +271,12 @@ prepare (GeglOperation *operation)
  31. gint err;
  32. ff_cleanup (o);
  33. - err = av_open_input_file (&p->ic, o->path, NULL, 0, NULL);
  34. + err = avformat_open_input(&p->ic, o->path, NULL, 0);
  35. if (err < 0)
  36. {
  37. print_error (o->path, err);
  38. }
  39. - err = av_find_stream_info (p->ic);
  40. + err = avformat_find_stream_info (p->ic, NULL);
  41. if (err < 0)
  42. {
  43. g_warning ("ff-load: error finding stream info for %s", o->path);
  44. @@ -312,7 +312,7 @@ prepare (GeglOperation *operation)
  45. if (p->codec->capabilities & CODEC_CAP_TRUNCATED)
  46. p->enc->flags |= CODEC_FLAG_TRUNCATED;
  47. - if (avcodec_open (p->enc, p->codec) < 0)
  48. + if (avcodec_open2 (p->enc, p->codec, NULL) < 0)
  49. {
  50. g_warning ("error opening codec %s", p->enc->codec->name);
  51. return;
  52. --
  53. cgit v0.9.1