Mercurial > libavcodec.hg
comparison xl.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 | 4d371825ba2b |
children | 136334ad62b3 |
comparison
equal
deleted
inserted
replaced
9354:174309386512 | 9355:54bc8a2727b0 |
---|---|
38 64, 82, 94, 103, 108, 113, 116, 119, | 38 64, 82, 94, 103, 108, 113, 116, 119, |
39 120, 121, 122, 123, 124, 125, 126, 127}; | 39 120, 121, 122, 123, 124, 125, 126, 127}; |
40 | 40 |
41 static int decode_frame(AVCodecContext *avctx, | 41 static int decode_frame(AVCodecContext *avctx, |
42 void *data, int *data_size, | 42 void *data, int *data_size, |
43 const uint8_t *buf, int buf_size) | 43 AVPacket *avpkt) |
44 { | 44 { |
45 const uint8_t *buf = avpkt->data; | |
46 int buf_size = avpkt->size; | |
45 VideoXLContext * const a = avctx->priv_data; | 47 VideoXLContext * const a = avctx->priv_data; |
46 AVFrame * const p= (AVFrame*)&a->pic; | 48 AVFrame * const p= (AVFrame*)&a->pic; |
47 uint8_t *Y, *U, *V; | 49 uint8_t *Y, *U, *V; |
48 int i, j; | 50 int i, j; |
49 int stride; | 51 int stride; |