/*
* Beam Software SIFF demuxer
- * Copyright (c) 2007 Konstantin Shishkov.
+ * Copyright (c) 2007 Konstantin Shishkov
*
* This file is part of FFmpeg.
*
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/intreadwrite.h"
#include "avformat.h"
-#include "riff.h"
enum SIFFTags{
TAG_SIFF = MKTAG('S', 'I', 'F', 'F'),
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->codec->codec_type = CODEC_TYPE_AUDIO;
ast->codec->codec_id = CODEC_ID_PCM_U8;
ast->codec->channels = 1;
- ast->codec->bits_per_sample = c->bits;
+ ast->codec->bits_per_coded_sample = c->bits;
ast->codec->sample_rate = c->rate;
ast->codec->frame_size = c->block_align;
av_set_pts_info(ast, 16, 1, c->rate);
AVInputFormat siff_demuxer = {
"siff",
- "Beam Software SIFF",
+ NULL_IF_CONFIG_SMALL("Beam Software SIFF"),
sizeof(SIFFContext),
siff_probe,
siff_read_header,