0002-Use-AV_INPUT_BUFFER_PADDING_SIZE-to-determine-paddin.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. From 84b1919124884232e0fa30b30458470db27c73fc Mon Sep 17 00:00:00 2001
  2. From: James Cowgill <jcowgill@debian.org>
  3. Date: Sat, 18 Aug 2018 12:56:38 +0200
  4. Subject: [PATCH] Use AV_INPUT_BUFFER_PADDING_SIZE to determine padding
  5. size
  6. Hardcoding the value for FF_INPUT_BUFFER_PADDING_SIZE is not safe
  7. because upstream FFmpeg might change it (as they did in FFmpeg 4.0).
  8. Instead, use FFmpeg's AV_INPUT_BUFFER_PADDING_SIZE if available and
  9. only hardcode a value if FFmpeg is disabled (in which case the value
  10. doesn't particularly matter anyway). For compatibility with older
  11. FFmpeg versions, define AV_INPUT_BUFFER_PADDING_SIZE if hasn't been
  12. defined yet.
  13. Downloaded from
  14. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=901735
  15. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
  16. [Fabrice: updated for 4.3.1]
  17. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  18. ---
  19. src/utils/ffmpeg-priv.h | 4 ++++
  20. src/videofilters/nowebcam.c | 4 ++--
  21. 2 files changed, 6 insertions(+), 2 deletions(-)
  22. diff --git a/src/utils/ffmpeg-priv.h b/src/utils/ffmpeg-priv.h
  23. index c0745a9a..d59ea0e1 100644
  24. --- a/src/utils/ffmpeg-priv.h
  25. +++ b/src/utils/ffmpeg-priv.h
  26. @@ -102,6 +102,10 @@ static inline int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
  27. #endif
  28. #endif
  29. +#ifndef AV_INPUT_BUFFER_PADDING_SIZE
  30. +#define AV_INPUT_BUFFER_PADDING_SIZE FF_INPUT_BUFFER_PADDING_SIZE
  31. +#endif
  32. +
  33. #ifndef HAVE_FUN_avcodec_encode_video2
  34. int avcodec_encode_video2 (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr);
  35. #endif
  36. --
  37. 2.18.0