comparison truespeech.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 e9d9d946f213
children 8a4984c5cacc
comparison
equal deleted inserted replaced
9354:174309386512 9355:54bc8a2727b0
330 c->prevfilt[i] = c->cvector[i]; 330 c->prevfilt[i] = c->cvector[i];
331 } 331 }
332 332
333 static int truespeech_decode_frame(AVCodecContext *avctx, 333 static int truespeech_decode_frame(AVCodecContext *avctx,
334 void *data, int *data_size, 334 void *data, int *data_size,
335 const uint8_t *buf, int buf_size) 335 AVPacket *avpkt)
336 { 336 {
337 const uint8_t *buf = avpkt->data;
338 int buf_size = avpkt->size;
337 TSContext *c = avctx->priv_data; 339 TSContext *c = avctx->priv_data;
338 340
339 int i, j; 341 int i, j;
340 short *samples = data; 342 short *samples = data;
341 int consumed = 0; 343 int consumed = 0;