/*
- * D-Cinema audio decoder.
- * Copyright (c) 2005 Reimar Döffinger.
+ * D-Cinema audio demuxer
+ * Copyright (c) 2005 Reimar Döffinger
*
* This file is part of FFmpeg.
*
static int daud_header(AVFormatContext *s, AVFormatParameters *ap) {
AVStream *st = av_new_stream(s, 0);
+ if (!st)
+ return AVERROR(ENOMEM);
st->codec->codec_type = CODEC_TYPE_AUDIO;
st->codec->codec_id = CODEC_ID_PCM_S24DAUD;
st->codec->codec_tag = MKTAG('d', 'a', 'u', 'd');
}
static int daud_packet(AVFormatContext *s, AVPacket *pkt) {
- ByteIOContext *pb = &s->pb;
+ ByteIOContext *pb = s->pb;
int ret, size;
if (url_feof(pb))
- return AVERROR_IO;
+ return AVERROR(EIO);
size = get_be16(pb);
get_be16(pb); // unknown
ret = av_get_packet(pb, pkt, size);
AVInputFormat daud_demuxer = {
"daud",
- "D-Cinema audio format",
+ NULL_IF_CONFIG_SMALL("D-Cinema audio format"),
0,
NULL,
daud_header,