Lines Matching refs:frame
99 static int amr_nb_decode_frame(AVCodecContext *avctx, AVFrame *frame,
113 frame->nb_samples = 160;
114 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
121 av_log(avctx, AV_LOG_ERROR, "AMR frame too short (%d, should be %d)\n",
129 Decoder_Interface_Decode(s->dec_state, buf, (short *)frame->data[0], 0);
237 const AVFrame *frame, int *got_packet_ptr)
242 const int16_t *samples = frame ? (const int16_t *)frame->data[0] : NULL;
252 if (frame) {
253 if (frame->nb_samples < avctx->frame_size) {
257 memcpy(flush_buf, samples, frame->nb_samples * sizeof(*flush_buf));
259 if (frame->nb_samples < avctx->frame_size - avctx->initial_padding)
262 if ((ret = ff_af_queue_add(&s->afq, frame)) < 0) {
281 /* Get the next frame pts/duration */
332 static int amr_wb_decode_frame(AVCodecContext *avctx, AVFrame *frame,
343 frame->nb_samples = 320;
344 if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
351 av_log(avctx, AV_LOG_ERROR, "AMR frame too short (%d, should be %d)\n",
360 D_IF_decode(s->state, buf, (short *)frame->data[0], _good_frame);