---
 libavcodec/tiffenc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/tiffenc.c b/libavcodec/tiffenc.c
index 169360f..423c7ca 100644
--- a/libavcodec/tiffenc.c
+++ b/libavcodec/tiffenc.c
@@ -166,14 +166,14 @@ static int encode_strip(TiffEncoderContext *s, const 
int8_t *src,
         unsigned long zlen = s->buf_size - (*s->buf - s->buf_start);
         if (compress(dst, &zlen, src, n) != Z_OK) {
             av_log(s->avctx, AV_LOG_ERROR, "Compressing failed\n");
-            return -1;
+            return AVERROR_INVALIDDATA;
         }
         return zlen;
     }
 #endif
     case TIFF_RAW:
         if (check_size(s, n))
-            return -1;
+            return AVERROR(EINVAL);
         memcpy(dst, src, n);
         return n;
     case TIFF_PACKBITS:
@@ -182,7 +182,7 @@ static int encode_strip(TiffEncoderContext *s, const int8_t 
*src,
     case TIFF_LZW:
         return ff_lzw_encode(s->lzws, src, n);
     default:
-        return -1;
+        return AVERROR_UNKNOWN;
     }
 }
 
@@ -291,7 +291,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket 
*pkt,
     default:
         av_log(s->avctx, AV_LOG_ERROR,
                "This colors format is not supported\n");
-        return -1;
+        return AVERROR_INVALIDDATA;
     }
 
     if (s->compr == TIFF_DEFLATE       ||
-- 
1.8.3.2

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to