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,
>          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);
> @@ -182,7 +182,7 @@ static int encode_strip(TiffEncoderContext *s, const 
> int8_t *src,
>      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;
>      }

This changes the code, but not the documentation..

Diego
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to