* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/**
- * @file libavformat/aea.c
- */
-
#include "avformat.h"
-#include "raw.h"
+#include "pcm.h"
#include "libavutil/intreadwrite.h"
+#include "libavutil/audioconvert.h"
#define AT1_SU_SIZE 212
/* Check so that the redundant bsm bytes and info bytes are valid
* the block size mode bytes have to be the same
* the info bytes have to be the same
- * the block size mode and info byte can't be the same
*/
- if (bsm_s == bsm_e && inb_s == inb_e && bsm_s != inb_s)
- return AVPROBE_SCORE_MAX / 2;
+ if (bsm_s == bsm_e && inb_s == inb_e)
+ return AVPROBE_SCORE_MAX / 4 + 1;
}
return 0;
}
return AVERROR(ENOMEM);
/* Parse the amount of channels and skip to pos 2048(0x800) */
- url_fskip(s->pb, 264);
- st->codec->channels = get_byte(s->pb);
- url_fskip(s->pb, 1783);
+ avio_skip(s->pb, 264);
+ st->codec->channels = avio_r8(s->pb);
+ avio_skip(s->pb, 1783);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
return -1;
}
- st->codec->channel_layout = (st->codec->channels == 1) ? CH_LAYOUT_MONO : CH_LAYOUT_STEREO;
+ st->codec->channel_layout = (st->codec->channels == 1) ? AV_CH_LAYOUT_MONO : AV_CH_LAYOUT_STEREO;
st->codec->block_align = AT1_SU_SIZE * st->codec->channels;
return 0;
return ret;
}
-AVInputFormat aea_demuxer = {
+AVInputFormat ff_aea_demuxer = {
"aea",
NULL_IF_CONFIG_SMALL("MD STUDIO audio"),
0,