Mercurial > libavcodec.hg
comparison c93.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 | e943e1409077 |
children | 8a4984c5cacc |
comparison
equal
deleted
inserted
replaced
9354:174309386512 | 9355:54bc8a2727b0 |
---|---|
111 } | 111 } |
112 } | 112 } |
113 } | 113 } |
114 | 114 |
115 static int decode_frame(AVCodecContext *avctx, void *data, | 115 static int decode_frame(AVCodecContext *avctx, void *data, |
116 int *data_size, const uint8_t * buf, int buf_size) | 116 int *data_size, AVPacket *avpkt) |
117 { | 117 { |
118 const uint8_t *buf = avpkt->data; | |
119 int buf_size = avpkt->size; | |
118 C93DecoderContext * const c93 = avctx->priv_data; | 120 C93DecoderContext * const c93 = avctx->priv_data; |
119 AVFrame * const newpic = &c93->pictures[c93->currentpic]; | 121 AVFrame * const newpic = &c93->pictures[c93->currentpic]; |
120 AVFrame * const oldpic = &c93->pictures[c93->currentpic^1]; | 122 AVFrame * const oldpic = &c93->pictures[c93->currentpic^1]; |
121 AVFrame *picture = data; | 123 AVFrame *picture = data; |
122 uint8_t *out; | 124 uint8_t *out; |