65 const uint8_t *buf = avpkt->
data;
66 int buf_size = avpkt->
size;
69 if (buf_size < avctx->block_align) {
106 memset(s, 0,
sizeof(*s));
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
AVFrame * coded_frame
the picture in the bitstream
#define AV_LOG_WARNING
Something somehow does not look correct.
int block_align
number of bytes per packet if constant and known or 0 Used by some WAV based audio codecs...
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
enum AVSampleFormat sample_fmt
audio sample format
#define GSM_MS_BLOCK_SIZE
bitstream reader API header.
static void gsm_flush(AVCodecContext *avctx)
static int init(AVCodecParserContext *s)
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void av_log(void *avcl, int level, const char *fmt,...)
const char * name
Name of the codec implementation.
AVCodec ff_gsm_ms_decoder
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame)
static av_cold int gsm_init(AVCodecContext *avctx)
as in Berlin toast format
int frame_size
Samples per packet, initialized when calling 'init'.
int sample_rate
samples per second
main external API structure.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
static int gsm_decode_block(AVCodecContext *avctx, int16_t *samples, GetBitContext *gb)
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
common internal api header.
static av_cold void flush(AVCodecContext *avctx)
Flush (reset) the frame ID after seeking.
static int gsm_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
int channels
number of audio channels
void avcodec_get_frame_defaults(AVFrame *pic)
Set the fields of the given AVFrame to default values.
int ff_msgsm_decode_block(AVCodecContext *avctx, int16_t *samples, const uint8_t *buf)
int nb_samples
number of audio samples (per channel) described by this frame