*/
#include "avformat.h"
+#include "internal.h"
static const char AMR_header [] = "#!AMR\n";
static const char AMRWB_header [] = "#!AMR-WB\n";
}
/* amr input */
-static int amr_read_header(AVFormatContext *s,
- AVFormatParameters *ap)
+static int amr_read_header(AVFormatContext *s)
{
AVIOContext *pb = s->pb;
AVStream *st;
st->codec->codec_tag = MKTAG('s', 'a', 'w', 'b');
st->codec->codec_id = CODEC_ID_AMR_WB;
st->codec->sample_rate = 16000;
- st->codec->frame_size = 320;
}
else
{
st->codec->codec_tag = MKTAG('s', 'a', 'm', 'r');
st->codec->codec_id = CODEC_ID_AMR_NB;
st->codec->sample_rate = 8000;
- st->codec->frame_size = 160;
}
st->codec->channels = 1;
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- av_set_pts_info(st, 64, 1, st->codec->sample_rate);
+ avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
return 0;
}
AVInputFormat ff_amr_demuxer = {
.name = "amr",
.long_name = NULL_IF_CONFIG_SMALL("3GPP AMR file format"),
- .priv_data_size = 0, /*priv_data_size*/
.read_probe = amr_probe,
.read_header = amr_read_header,
.read_packet = amr_read_packet,
- .flags = AVFMT_GENERIC_INDEX,
+ .flags = AVFMT_GENERIC_INDEX,
};
#endif