comparison sunrast.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 2acf0ae7b041
children 6cd9e789dd9e
comparison
equal deleted inserted replaced
9354:174309386512 9355:54bc8a2727b0
41 41
42 return 0; 42 return 0;
43 } 43 }
44 44
45 static int sunrast_decode_frame(AVCodecContext *avctx, void *data, 45 static int sunrast_decode_frame(AVCodecContext *avctx, void *data,
46 int *data_size, const uint8_t *buf, int buf_size) { 46 int *data_size, AVPacket *avpkt) {
47 const uint8_t *buf = avpkt->data;
48 int buf_size = avpkt->size;
47 SUNRASTContext * const s = avctx->priv_data; 49 SUNRASTContext * const s = avctx->priv_data;
48 AVFrame *picture = data; 50 AVFrame *picture = data;
49 AVFrame * const p = &s->picture; 51 AVFrame * const p = &s->picture;
50 unsigned int w, h, depth, type, maptype, maplength, stride, x, y, len, alen; 52 unsigned int w, h, depth, type, maptype, maplength, stride, x, y, len, alen;
51 uint8_t *ptr; 53 uint8_t *ptr;