/*
* WavPack demuxer
- * Copyright (c) 2006 Konstantin Shishkov.
+ * Copyright (c) 2006 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 "bswap.h"
// specs say that maximum block size is 1Mb
#define WV_BLOCK_LIMIT 1047576
av_log(ctx, AV_LOG_ERROR, "Floating point data is not supported\n");
return -1;
}
- if(wc->flags & WV_HYBRID){
- av_log(ctx, AV_LOG_ERROR, "Hybrid coding mode is not supported\n");
- return -1;
- }
bpp = ((wc->flags & 3) + 1) << 3;
chan = 1 + !(wc->flags & WV_MONO);
st->codec->codec_id = CODEC_ID_WAVPACK;
st->codec->channels = wc->chan;
st->codec->sample_rate = wc->rate;
- st->codec->bits_per_sample = wc->bpp;
+ st->codec->bits_per_coded_sample = wc->bpp;
av_set_pts_info(st, 64, 1, wc->rate);
s->start_time = 0;
s->duration = (int64_t)wc->samples * AV_TIME_BASE / st->codec->sample_rate;
return 0;
}
-static int wv_read_close(AVFormatContext *s)
-{
- return 0;
-}
-
static int wv_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
{
AVStream *st = s->streams[stream_index];
AVInputFormat wv_demuxer = {
"wv",
- "WavPack",
+ NULL_IF_CONFIG_SMALL("WavPack"),
sizeof(WVContext),
wv_probe,
wv_read_header,
wv_read_packet,
- wv_read_close,
+ NULL,
wv_read_seek,
};