On Tue, Jan 13, 2015 at 01:53:48PM +0100, Vittorio Giovara wrote:
> Return proper error code, print and error message and add missing
an_
> parenthesis.
Parenthes_e_s, the 'i' denotes the singular.
> --- a/libavcodec/pngdec.c
> +++ b/libavcodec/pngdec.c
> @@ -415,9 +415,10 @@ static int decode_frame(AVCodecContext *avctx,
> if (buf_size < 8 ||
> - memcmp(buf, ff_pngsig, 8) != 0 &&
> - memcmp(buf, ff_mngsig, 8) != 0)
> - return -1;
> + (memcmp(buf, ff_pngsig, 8) != 0 && memcmp(buf, ff_mngsig, 8) != 0)) {
> + av_log(avctx, AV_LOG_ERROR, "Invalid PNG signature (%d).\n",
> buf_size);
> + return AVERROR_INVALIDDATA;
Probably was more readable before, not that I care...
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel