comparison targa.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 4cab394c16ea
comparison
equal deleted inserted replaced
9354:174309386512 9355:54bc8a2727b0
89 } 89 }
90 } 90 }
91 91
92 static int decode_frame(AVCodecContext *avctx, 92 static int decode_frame(AVCodecContext *avctx,
93 void *data, int *data_size, 93 void *data, int *data_size,
94 const uint8_t *buf, int buf_size) 94 AVPacket *avpkt)
95 { 95 {
96 const uint8_t *buf = avpkt->data;
97 int buf_size = avpkt->size;
96 TargaContext * const s = avctx->priv_data; 98 TargaContext * const s = avctx->priv_data;
97 AVFrame *picture = data; 99 AVFrame *picture = data;
98 AVFrame * const p= (AVFrame*)&s->picture; 100 AVFrame * const p= (AVFrame*)&s->picture;
99 uint8_t *dst; 101 uint8_t *dst;
100 int stride; 102 int stride;