comparison mace.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
234 return 0; 234 return 0;
235 } 235 }
236 236
237 static int mace_decode_frame(AVCodecContext *avctx, 237 static int mace_decode_frame(AVCodecContext *avctx,
238 void *data, int *data_size, 238 void *data, int *data_size,
239 const uint8_t *buf, int buf_size) 239 AVPacket *avpkt)
240 { 240 {
241 const uint8_t *buf = avpkt->data;
242 int buf_size = avpkt->size;
241 int16_t *samples = data; 243 int16_t *samples = data;
242 MACEContext *ctx = avctx->priv_data; 244 MACEContext *ctx = avctx->priv_data;
243 int i, j, k, l; 245 int i, j, k, l;
244 int is_mace3 = (avctx->codec_id == CODEC_ID_MACE3); 246 int is_mace3 = (avctx->codec_id == CODEC_ID_MACE3);
245 247