comparison libspeexdec.c @ 9355:54bc8a2727b0 libavcodec

Implement avcodec_decode_video2(), _audio3() and _subtitle2() which takes an AVPacket argument rather than a const uint8_t *buf + int buf_size. This allows passing of packet-specific flags from demuxer to decoder, such as the keyframe flag, which appears necessary to playback corePNG P-frames. Patch by Thilo Borgmann thilo.borgmann googlemail com, see also the thread "Google Summer of Code participation" on the mailinglist.
author rbultje
date Tue, 07 Apr 2009 15:59:50 +0000
parents 4bb782c7793e
children 4186efb86933
comparison
equal deleted inserted replaced
9354:174309386512 9355:54bc8a2727b0
88 return 0; 88 return 0;
89 } 89 }
90 90
91 static int libspeex_decode_frame(AVCodecContext *avctx, 91 static int libspeex_decode_frame(AVCodecContext *avctx,
92 void *data, int *data_size, 92 void *data, int *data_size,
93 const uint8_t *buf, int buf_size) 93 AVPacket *avpkt)
94 { 94 {
95 const uint8_t *buf = avpkt->data;
96 int buf_size = avpkt->size;
95 LibSpeexContext *s = avctx->priv_data; 97 LibSpeexContext *s = avctx->priv_data;
96 int16_t *output = data, *end; 98 int16_t *output = data, *end;
97 int i, num_samples; 99 int i, num_samples;
98 100
99 num_samples = avctx->frame_size * avctx->channels; 101 num_samples = avctx->frame_size * avctx->channels;