[FFmpeg-cvslog] Merge commit '6c445990e64124ad64c79423dfd3764520648c89'
Hendrik Leppkes
git at videolan.org
Mon Nov 14 13:35:18 EET 2016
ffmpeg | branch: master | Hendrik Leppkes <h.leppkes at gmail.com> | Mon Nov 14 12:32:08 2016 +0100| [985bc8b49683761e5014a22146d4346c951680ad] | committer: Hendrik Leppkes
Merge commit '6c445990e64124ad64c79423dfd3764520648c89'
* commit '6c445990e64124ad64c79423dfd3764520648c89':
tiffenc: Check zlib support for deflate option during initialization
Merged-by: Hendrik Leppkes <h.leppkes at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=985bc8b49683761e5014a22146d4346c951680ad
---
libavcodec/tiffenc.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/libavcodec/tiffenc.c b/libavcodec/tiffenc.c
index e575c4c..f59816e 100644
--- a/libavcodec/tiffenc.c
+++ b/libavcodec/tiffenc.c
@@ -524,6 +524,15 @@ fail:
static av_cold int encode_init(AVCodecContext *avctx)
{
TiffEncoderContext *s = avctx->priv_data;
+
+#if !CONFIG_ZLIB
+ if (s->compr == TIFF_DEFLATE) {
+ av_log(avctx, AV_LOG_ERROR,
+ "Deflate compression needs zlib compiled in\n");
+ return AVERROR(ENOSYS);
+ }
+#endif
+
#if FF_API_CODED_FRAME
FF_DISABLE_DEPRECATION_WARNINGS
avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
@@ -554,9 +563,7 @@ static const AVOption options[] = {
{ "packbits", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = TIFF_PACKBITS }, 0, 0, VE, "compression_algo" },
{ "raw", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = TIFF_RAW }, 0, 0, VE, "compression_algo" },
{ "lzw", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = TIFF_LZW }, 0, 0, VE, "compression_algo" },
-#if CONFIG_ZLIB
{ "deflate", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = TIFF_DEFLATE }, 0, 0, VE, "compression_algo" },
-#endif
{ NULL },
};
======================================================================
diff --cc libavcodec/tiffenc.c
index e575c4c,8791c54..f59816e
--- a/libavcodec/tiffenc.c
+++ b/libavcodec/tiffenc.c
@@@ -523,7 -492,16 +523,16 @@@ fail
static av_cold int encode_init(AVCodecContext *avctx)
{
-#if !CONFIG_ZLIB
TiffEncoderContext *s = avctx->priv_data;
+
++#if !CONFIG_ZLIB
+ if (s->compr == TIFF_DEFLATE) {
+ av_log(avctx, AV_LOG_ERROR,
+ "Deflate compression needs zlib compiled in\n");
+ return AVERROR(ENOSYS);
+ }
+ #endif
+
#if FF_API_CODED_FRAME
FF_DISABLE_DEPRECATION_WARNINGS
avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
More information about the ffmpeg-cvslog
mailing list