Am Sa., 27. Juni 2020 um 20:11 Uhr schrieb <gautamr...@gmail.com>: > +static int ff_pgx_decode_header(AVCodecContext *avctx, PGXContext * s, > + int *depth, int *width, int *height, > + int *sign) > +{ > + const char *header_start = "PG ML "; > + int byte; > + > + if (bytestream2_get_bytes_left(&s->g) < 13) { > + return AVERROR_INVALIDDATA; > + }
Do other decoders do this for 13 bytes or less? > + // Checks whether file starts with "PG ML " > + if (memcmp(header_start, s->g.buffer, 6)) > + return AVERROR_INVALIDDATA; If you really have to keep this why isn't it: memcmp("PG ML ", s->g.buffer, 6) which would make the ugly comment go away? Carl Eugen _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".