Mercurial > libavcodec.hg
comparison mimic.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 | 409d20e15da8 |
children | 1eafaea58613 |
comparison
equal
deleted
inserted
replaced
9354:174309386512 | 9355:54bc8a2727b0 |
---|---|
272 for(i = 0; i < 3; i++) | 272 for(i = 0; i < 3; i++) |
273 dst->linesize[i] = -src->linesize[i]; | 273 dst->linesize[i] = -src->linesize[i]; |
274 } | 274 } |
275 | 275 |
276 static int mimic_decode_frame(AVCodecContext *avctx, void *data, | 276 static int mimic_decode_frame(AVCodecContext *avctx, void *data, |
277 int *data_size, const uint8_t *buf, int buf_size) | 277 int *data_size, AVPacket *avpkt) |
278 { | 278 { |
279 const uint8_t *buf = avpkt->data; | |
280 int buf_size = avpkt->size; | |
279 MimicContext *ctx = avctx->priv_data; | 281 MimicContext *ctx = avctx->priv_data; |
280 int is_pframe; | 282 int is_pframe; |
281 int width, height; | 283 int width, height; |
282 int quality, num_coeffs; | 284 int quality, num_coeffs; |
283 int swap_buf_size = buf_size - MIMIC_HEADER_SIZE; | 285 int swap_buf_size = buf_size - MIMIC_HEADER_SIZE; |