[FFmpeg-devel] [PATCH] tiff: Return more meaningful error codes

Carl Eugen Hoyos cehoyos at ag.or.at
Sat Mar 28 18:56:05 CET 2015


Himangi Saraogi <himangi774 <at> gmail.com> writes:

>          if (compress(dst, &zlen, src, n) != Z_OK) {
>              av_log(s->avctx, AV_LOG_ERROR, "Compressing failed\n");
> -            return -1;
> +            return AVERROR_INVALIDDATA;

-1 seems more correct to me.

>      case TIFF_LZW:
>          return ff_lzw_encode(s->lzws, src, n);
>      default:
> -        return -1;
> +        return AVERROR_UNKNOWN;

Can this be reached?
If yes, please print an error, if not, replace the 
return with an assert.

Carl Eugen



More information about the ffmpeg-devel mailing list