commit 9175d09f1312a1495c287c6d0d45da675e359b1c
parent f033468cd36e2b8bf92d747fbd683b2ace8da394
Author: Christian Grothoff <christian@grothoff.org>
Date: Thu, 12 Jul 2018 22:31:44 +0200
fix #888373
Diffstat:
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,5 +1,6 @@
Thu Jul 12 22:26:36 CEST 2018
Fix potential infinite loop in mpeg extractor.
+ Fix build issue with FFmpeg 4.0 (Debian #888373).
Releasing GNU libextractor 1.7. -CG
Thu Jul 12 21:23:43 CEST 2018
diff --git a/src/plugins/thumbnailffmpeg_extractor.c b/src/plugins/thumbnailffmpeg_extractor.c
@@ -107,7 +107,17 @@
/**
* Number of bytes to feed to libav in one go, with padding (padding is zeroed).
*/
+#ifdef AV_INPUT_BUFFER_PADDING_SIZE
+#define PADDED_BUFFER_SIZE (BUFFER_SIZE + AV_INPUT_BUFFER_PADDING_SIZE)
+#else
+/* legacy */
#define PADDED_BUFFER_SIZE (BUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE)
+#endif
+
+#ifndef AV_CODEC_FLAG_QSCALE
+#define AV_CODEC_FLAG_QSCALE CODEC_FLAG_QSCALE
+#endif
+
/**
* Global handle to MAGIC data.
@@ -355,7 +365,7 @@ create_thumbnail (AVCodecContext *pCodecCtx, int src_width, int src_height,
encoder_codec_ctx->mb_lmin = encoder_codec_ctx->qmin * FF_QP2LAMBDA;
encoder_codec_ctx->mb_lmax = encoder_codec_ctx->qmax * FF_QP2LAMBDA;
#endif
- encoder_codec_ctx->flags = CODEC_FLAG_QSCALE;
+ encoder_codec_ctx->flags = AV_CODEC_FLAG_QSCALE;
encoder_codec_ctx->global_quality = encoder_codec_ctx->qmin * FF_QP2LAMBDA;
dst_frame->pts = 1;