ffmpeginput.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. diff -Nuar a/src/ffmpeg.imageio/ffmpeginput.cpp b/src/ffmpeg.imageio/ffmpeginput.cpp
  2. --- a/src/ffmpeg.imageio/ffmpeginput.cpp 2018-03-01 08:49:23.000000000 +0300
  3. +++ b/src/ffmpeg.imageio/ffmpeginput.cpp 2018-04-27 01:05:14.877091949 +0300
  4. @@ -124,6 +124,15 @@
  5. }
  6. #endif
  7. +
  8. +// Changes for ffmpeg 4.0
  9. +#define USE_FFMPEG_4_0 (LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(58, 18, 100))
  10. +
  11. +#if USE_FFMPEG_4_0
  12. +# define CODEC_CAP_DELAY AV_CODEC_CAP_DELAY
  13. +#endif
  14. +
  15. +
  16. #include <boost/thread/once.hpp>
  17. #include <OpenImageIO/imageio.h>
  18. @@ -136,12 +145,12 @@
  19. public:
  20. FFmpegInput ();
  21. virtual ~FFmpegInput();
  22. - virtual const char *format_name (void) const { return "FFmpeg movie"; }
  23. - virtual bool open (const std::string &name, ImageSpec &spec);
  24. - virtual bool close (void);
  25. - virtual int current_subimage (void) const { return m_subimage; }
  26. - virtual bool seek_subimage (int subimage, int miplevel, ImageSpec &newspec);
  27. - virtual bool read_native_scanline (int y, int z, void *data);
  28. + virtual const char *format_name (void) const override { return "FFmpeg movie"; }
  29. + virtual bool open (const std::string &name, ImageSpec &spec) override;
  30. + virtual bool close (void) override;
  31. + virtual int current_subimage (void) const override { return m_subimage; }
  32. + virtual bool seek_subimage (int subimage, int miplevel, ImageSpec &newspec) override;
  33. + virtual bool read_native_scanline (int y, int z, void *data) override;
  34. void read_frame(int pos);
  35. #if 0
  36. const char *metadata (const char * key);