Mercurial > libavcodec.hg
comparison pcx.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 | 0dce4fe6e6f3 |
comparison
equal
deleted
inserted
replaced
9354:174309386512 | 9355:54bc8a2727b0 |
---|---|
68 *dst++ = bytestream_get_be24(src); | 68 *dst++ = bytestream_get_be24(src); |
69 memset(dst, 0, (256 - pallen) * sizeof(*dst)); | 69 memset(dst, 0, (256 - pallen) * sizeof(*dst)); |
70 } | 70 } |
71 | 71 |
72 static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *data_size, | 72 static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *data_size, |
73 const uint8_t *buf, int buf_size) { | 73 AVPacket *avpkt) { |
74 const uint8_t *buf = avpkt->data; | |
75 int buf_size = avpkt->size; | |
74 PCXContext * const s = avctx->priv_data; | 76 PCXContext * const s = avctx->priv_data; |
75 AVFrame *picture = data; | 77 AVFrame *picture = data; |
76 AVFrame * const p = &s->picture; | 78 AVFrame * const p = &s->picture; |
77 int xmin, ymin, xmax, ymax; | 79 int xmin, ymin, xmax, ymax; |
78 unsigned int w, h, bits_per_pixel, bytes_per_line, nplanes, stride, y, x, | 80 unsigned int w, h, bits_per_pixel, bytes_per_line, nplanes, stride, y, x, |