s->split_planes = str && !av_strcasecmp(str + 1, "y");
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
if (s1->pb) {
- int probe_buffer_size = 8;
+ int probe_buffer_size = 2048;
uint8_t *probe_buffer = av_realloc(NULL, probe_buffer_size + AVPROBE_PADDING_SIZE);
AVInputFormat *fmt = NULL;
AVProbeData pd;
static int bmp_probe(AVProbeData *p)
{
const uint8_t *b = p->buf;
+ int ihsize;
- if (AV_RB16(b) == 0x424d)
- if (!AV_RN32(b + 6)) {
- return AVPROBE_SCORE_EXTENSION + 1;
- } else {
- return AVPROBE_SCORE_EXTENSION / 4;
- }
+ if (AV_RB16(b) != 0x424d)
+ return 0;
+
+ ihsize = AV_RL32(b+14);
+ if (ihsize < 12 || ihsize > 255)
+ return 0;
+
+ if (!AV_RN32(b + 6)) {
+ return AVPROBE_SCORE_EXTENSION + 1;
+ } else {
+ return AVPROBE_SCORE_EXTENSION / 4;
+ }
return 0;
}
{
const uint8_t *b = p->buf;
- if (AV_RB32(b) == 0x49492a00)
+ if (AV_RB32(b) == 0x49492a00 ||
+ AV_RB32(b) == 0x4D4D002a)
return AVPROBE_SCORE_EXTENSION + 1;
return 0;
}
};\
AVInputFormat ff_image_ ## imgname ## _pipe_demuxer = {\
.name = AV_STRINGIFY(imgname) "_pipe",\
+ .long_name = NULL_IF_CONFIG_SMALL("piped " AV_STRINGIFY(imgname) " sequence"),\
.priv_data_size = sizeof(VideoDemuxData),\
.read_probe = imgname ## _probe,\
.read_header = ff_img_read_header,\
.read_packet = ff_img_read_packet,\
- .read_close = img_read_close,\
- .read_seek = img_read_seek,\
.priv_class = & imgname ## _class,\
.raw_codec_id = codecid,\
};