static int siff_probe(AVProbeData *p)
{
+ uint32_t tag = AV_RL32(p->buf + 8);
/* check file header */
- if (AV_RL32(p->buf) == TAG_SIFF)
- return AVPROBE_SCORE_MAX;
- else
+ if (AV_RL32(p->buf) != TAG_SIFF ||
+ (tag != TAG_VBV1 && tag != TAG_SOUN))
return 0;
+ return AVPROBE_SCORE_MAX;
}
static int create_audio_stream(AVFormatContext *s, SIFFContext *c)
ast = av_new_stream(s, 0);
if (!ast)
return -1;
- ast->codec->codec_type = CODEC_TYPE_AUDIO;
+ ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
ast->codec->codec_id = CODEC_ID_PCM_U8;
ast->codec->channels = 1;
ast->codec->bits_per_coded_sample = c->bits;
st = av_new_stream(s, 0);
if (!st)
return -1;
- st->codec->codec_type = CODEC_TYPE_VIDEO;
+ st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = CODEC_ID_VB;
st->codec->codec_tag = MKTAG('V', 'B', 'V', '1');
st->codec->width = width;
c->curstrm = 0;
}
if(!c->cur_frame || c->curstrm)
- pkt->flags |= PKT_FLAG_KEY;
+ pkt->flags |= AV_PKT_FLAG_KEY;
if (c->curstrm == -1)
c->cur_frame++;
}else{