35 #define OPUS_HEAD_SIZE 19 66 memcpy(extradata, packet, os->
psize);
77 if (os->
psize < 8 || memcmp(packet,
"OpusTags", 8))
94 unsigned toc, toc_config, toc_count,
frame_size, nb_frames = 1;
100 toc_config = toc >> 3;
102 frame_size = toc_config < 12 ?
FFMAX(480, 960 * (toc_config & 3)) :
103 toc_config < 16 ? 480 << (toc_config & 1) :
104 120 << (toc_config & 3);
105 if (toc_count == 3) {
108 nb_frames = packet[1] & 0x3F;
109 }
else if (toc_count) {
127 "Last packet is truncated to %d (because of unimplemented end trim support).\n",
142 .granule_is_start = 1,
void * av_malloc(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
Copyright (C) 2005 Michael Ahlberg, Måns Rullgård.
#define AV_LOG_WARNING
Something somehow does not look correct.
static const uint8_t frame_size[4]
static int opus_header(AVFormatContext *avf, int idx)
enum AVCodecID codec_id
Specific type of the encoded data (the codec used).
av_log(ac->avr, AV_LOG_TRACE, "%d samples - audio_convert: %s to %s (%s)\, len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt), use_generic ? ac->func_descr_generic :ac->func_descr)
static int opus_packet(AVFormatContext *avf, int idx)
AVStream ** streams
A list of all streams in the file.
int initial_padding
Audio only.
int ff_vorbis_stream_comment(AVFormatContext *as, AVStream *st, const uint8_t *buf, int size)
enum AVMediaType codec_type
General type of the encoded data.
int extradata_size
Size of the extradata content in bytes.
struct ogg_stream * streams
#define AVERROR_PATCHWELCOME
Not yet implemented in Libav, patches welcome.
const struct ogg_codec ff_opus_codec
int sample_rate
Audio only.
int64_t start_time
Decoding: pts of the first frame of the stream, in stream time base.
#define AV_INPUT_BUFFER_PADDING_SIZE
Required number of additionally allocated bytes at the end of the input bitstream for decoding...
void * priv_data
Format private data.
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
AVCodecParameters * codecpar
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
#define AV_NOPTS_VALUE
Undefined timestamp value.