Autodetect webp files.
This commit is contained in:
parent
e4d983e2db
commit
f73d75384f
@ -197,6 +197,7 @@ OBJS-$(CONFIG_IMAGE_PNG_PIPE_DEMUXER) += img2dec.o img2.o
|
||||
OBJS-$(CONFIG_IMAGE_SGI_PIPE_DEMUXER) += img2dec.o img2.o
|
||||
OBJS-$(CONFIG_IMAGE_SUNRAST_PIPE_DEMUXER) += img2dec.o img2.o
|
||||
OBJS-$(CONFIG_IMAGE_TIFF_PIPE_DEMUXER) += img2dec.o img2.o
|
||||
OBJS-$(CONFIG_IMAGE_WEBP_PIPE_DEMUXER) += img2dec.o img2.o
|
||||
OBJS-$(CONFIG_INGENIENT_DEMUXER) += ingenientdec.o rawdec.o
|
||||
OBJS-$(CONFIG_IPMOVIE_DEMUXER) += ipmovie.o
|
||||
OBJS-$(CONFIG_IRCAM_DEMUXER) += ircamdec.o ircam.o pcm.o
|
||||
|
@ -330,6 +330,7 @@ void av_register_all(void)
|
||||
REGISTER_DEMUXER (IMAGE_SGI_PIPE, image_sgi_pipe);
|
||||
REGISTER_DEMUXER (IMAGE_SUNRAST_PIPE, image_sunrast_pipe);
|
||||
REGISTER_DEMUXER (IMAGE_TIFF_PIPE, image_tiff_pipe);
|
||||
REGISTER_DEMUXER (IMAGE_WEBP_PIPE, image_webp_pipe);
|
||||
|
||||
|
||||
/* protocols */
|
||||
|
@ -658,6 +658,16 @@ static int tiff_probe(AVProbeData *p)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int webp_probe(AVProbeData *p)
|
||||
{
|
||||
const uint8_t *b = p->buf;
|
||||
|
||||
if (AV_RB32(b) == 0x52494646 &&
|
||||
AV_RB32(b + 8) == 0x57454250)
|
||||
return AVPROBE_SCORE_MAX - 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define IMAGEAUTO_DEMUXER(imgname, codecid)\
|
||||
static const AVClass imgname ## _class = {\
|
||||
.class_name = AV_STRINGIFY(imgname) " demuxer",\
|
||||
@ -685,3 +695,4 @@ IMAGEAUTO_DEMUXER(png, AV_CODEC_ID_PNG)
|
||||
IMAGEAUTO_DEMUXER(sgi, AV_CODEC_ID_SGI)
|
||||
IMAGEAUTO_DEMUXER(sunrast, AV_CODEC_ID_SUNRAST)
|
||||
IMAGEAUTO_DEMUXER(tiff, AV_CODEC_ID_TIFF)
|
||||
IMAGEAUTO_DEMUXER(webp, AV_CODEC_ID_WEBP)
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
#define LIBAVFORMAT_VERSION_MAJOR 55
|
||||
|
||||
#define LIBAVFORMAT_VERSION_MINOR 53
|
||||
#define LIBAVFORMAT_VERSION_MINOR 54
|
||||
#define LIBAVFORMAT_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
|
||||
|
Loading…
x
Reference in New Issue
Block a user