提交 35adac6e 编写于 作者: G Gautam Ramakrishnan 提交者: Michael Niedermayer

libavformat/img2dec: Added pgx demuxer

This patch adds support to demux pgx file
format.
Signed-off-by: NMichael Niedermayer <michael@niedermayer.cc>
上级 cfe2cf0a
......@@ -488,6 +488,7 @@ extern AVInputFormat ff_image_pbm_pipe_demuxer;
extern AVInputFormat ff_image_pcx_pipe_demuxer;
extern AVInputFormat ff_image_pgmyuv_pipe_demuxer;
extern AVInputFormat ff_image_pgm_pipe_demuxer;
extern AVInputFormat ff_image_pgx_pipe_demuxer;
extern AVInputFormat ff_image_pictor_pipe_demuxer;
extern AVInputFormat ff_image_png_pipe_demuxer;
extern AVInputFormat ff_image_ppm_pipe_demuxer;
......
......@@ -1000,6 +1000,14 @@ static int pgmyuv_probe(const AVProbeData *p) // custom FFmpeg format recognized
return ret && av_match_ext(p->filename, "pgmyuv") ? ret : 0;
}
static int pgx_probe(const AVProbeData *p)
{
const uint8_t *b = p->buf;
if (!memcmp(b, "PG ML ", 6))
return AVPROBE_SCORE_EXTENSION + 1;
return 0;
}
static int ppm_probe(const AVProbeData *p)
{
return pnm_magic_check(p, 3) || pnm_magic_check(p, 6) ? pnm_probe(p) : 0;
......@@ -1094,6 +1102,7 @@ IMAGEAUTO_DEMUXER(pbm, AV_CODEC_ID_PBM)
IMAGEAUTO_DEMUXER(pcx, AV_CODEC_ID_PCX)
IMAGEAUTO_DEMUXER(pgm, AV_CODEC_ID_PGM)
IMAGEAUTO_DEMUXER(pgmyuv, AV_CODEC_ID_PGMYUV)
IMAGEAUTO_DEMUXER(pgx, AV_CODEC_ID_PGX)
IMAGEAUTO_DEMUXER(pictor, AV_CODEC_ID_PICTOR)
IMAGEAUTO_DEMUXER(png, AV_CODEC_ID_PNG)
IMAGEAUTO_DEMUXER(ppm, AV_CODEC_ID_PPM)
......
......@@ -32,7 +32,7 @@
// Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium)
// Also please add any ticket numbers that you believe might be affected here
#define LIBAVFORMAT_VERSION_MAJOR 58
#define LIBAVFORMAT_VERSION_MINOR 47
#define LIBAVFORMAT_VERSION_MINOR 48
#define LIBAVFORMAT_VERSION_MICRO 100
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册