On Thu, 19 Feb 2015, Diego Biurrun wrote:

On Thu, Feb 19, 2015 at 01:54:20PM +0530, Himangi Saraogi wrote:
--- 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;

Here you could propagate the return value of compress().

Is there any guarantee that compress uses error codes in the same range, or with similar values as normal AVERROR codes? Otherwise that is even worse than returning plain -1.

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

Reply via email to