Mercurial > libavcodec.hg
comparison bfi.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 | 043574c5c153 |
children | 885d3f36bcb2 |
comparison
equal
deleted
inserted
replaced
9354:174309386512 | 9355:54bc8a2727b0 |
---|---|
43 bfi->dst = av_mallocz(avctx->width * avctx->height); | 43 bfi->dst = av_mallocz(avctx->width * avctx->height); |
44 return 0; | 44 return 0; |
45 } | 45 } |
46 | 46 |
47 static int bfi_decode_frame(AVCodecContext * avctx, void *data, | 47 static int bfi_decode_frame(AVCodecContext * avctx, void *data, |
48 int *data_size, const uint8_t * buf, | 48 int *data_size, AVPacket *avpkt) |
49 int buf_size) | |
50 { | 49 { |
50 const uint8_t *buf = avpkt->data; | |
51 int buf_size = avpkt->size; | |
51 BFIContext *bfi = avctx->priv_data; | 52 BFIContext *bfi = avctx->priv_data; |
52 uint8_t *dst = bfi->dst; | 53 uint8_t *dst = bfi->dst; |
53 uint8_t *src, *dst_offset, colour1, colour2; | 54 uint8_t *src, *dst_offset, colour1, colour2; |
54 uint8_t *frame_end = bfi->dst + avctx->width * avctx->height; | 55 uint8_t *frame_end = bfi->dst + avctx->width * avctx->height; |
55 uint32_t *pal; | 56 uint32_t *pal; |