/*
* WAV muxer and demuxer
- * Copyright (c) 2001, 2002 Fabrice Bellard.
+ * Copyright (c) 2001, 2002 Fabrice Bellard
*
* This file is part of FFmpeg.
*
#include "riff.h"
typedef struct {
- offset_t data;
- offset_t data_end;
+ int64_t data;
+ int64_t data_end;
int64_t minpts;
int64_t maxpts;
int last_duration;
} WAVContext;
-#ifdef CONFIG_MUXERS
+#if CONFIG_WAV_MUXER
static int wav_write_header(AVFormatContext *s)
{
WAVContext *wav = s->priv_data;
ByteIOContext *pb = s->pb;
- offset_t fmt, fact;
+ int64_t fmt, fact;
put_tag(pb, "RIFF");
put_le32(pb, 0); /* file length */
/* format header */
fmt = start_tag(pb, "fmt ");
if (put_wav_header(pb, s->streams[0]->codec) < 0) {
+ av_log(s, AV_LOG_ERROR, "%s codec not supported in WAVE format\n",
+ s->streams[0]->codec->codec ? s->streams[0]->codec->codec->name : "NONE");
av_free(wav);
return -1;
}
{
ByteIOContext *pb = s->pb;
WAVContext *wav = s->priv_data;
- offset_t file_size;
+ int64_t file_size;
if (!url_is_streamed(s->pb)) {
end_tag(pb, wav->data);
}
return 0;
}
-#endif //CONFIG_MUXERS
+#endif /* CONFIG_WAV_MUXER */
/* return the size of the found tag */
/* XXX: > 2GB ? */
return pcm_read_seek(s, stream_index, timestamp, flags);
}
-#ifdef CONFIG_WAV_DEMUXER
+#if CONFIG_WAV_DEMUXER
AVInputFormat wav_demuxer = {
"wav",
NULL_IF_CONFIG_SMALL("WAV format"),
.codec_tag= (const AVCodecTag* const []){codec_wav_tags, 0},
};
#endif
-#ifdef CONFIG_WAV_MUXER
+#if CONFIG_WAV_MUXER
AVOutputFormat wav_muxer = {
"wav",
NULL_IF_CONFIG_SMALL("WAV format"),