Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGautam Ramakrishnan <gautamramk@gmail.com>2020-07-02 22:19:39 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2020-07-04 00:28:26 +0300
commit35adac6e926f95daa3cf54bd915122bda88c4ac0 (patch)
treee3c67a82e58a5f2a15bc2171972ba54dc4c518b6 /libavformat/img2dec.c
parentcfe2cf0a63c2f6a39cfe7a97d8191031e717bc69 (diff)
libavformat/img2dec: Added pgx demuxer
This patch adds support to demux pgx file format. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/img2dec.c')
-rw-r--r--libavformat/img2dec.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index ee7ceed08f..a7e89cd056 100644
--- a/libavformat/img2dec.c
+++ b/libavformat/img2dec.c
@@ -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)