67 int buf_size = avpkt->
size;
70 if (buf_size < avctx->block_align) {
107 memset(s, 0,
sizeof(*s));
This structure describes decoded (raw) audio or video data.
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
AVFrame * coded_frame
the picture in the bitstream
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 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.
uint64_t channel_layout
Audio channel layout.
audio channel layout utility functions
AVCodec ff_gsm_ms_decoder
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame)
Get a buffer for a frame.
static av_cold int gsm_init(AVCodecContext *avctx)
int frame_size
Number of samples per channel in an audio frame.
int sample_rate
samples per second
main external API structure.
void avcodec_get_frame_defaults(AVFrame *frame)
Set the fields of the given AVFrame to default values.
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)
struct GSMContext GSMContext
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)
#define AVERROR_INVALIDDATA
as in Berlin toast format
int channels
number of audio channels
#define AV_CH_LAYOUT_MONO
int ff_msgsm_decode_block(AVCodecContext *avctx, int16_t *samples, const uint8_t *buf)
This structure stores compressed data.
int nb_samples
number of audio samples (per channel) described by this frame