comparison cscd.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 967c0a1a60a0
children 266bf83f634d
comparison
equal deleted inserted replaced
9354:174309386512 9355:54bc8a2727b0
133 } 133 }
134 } 134 }
135 #endif 135 #endif
136 136
137 static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, 137 static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
138 const uint8_t *buf, int buf_size) { 138 AVPacket *avpkt) {
139 const uint8_t *buf = avpkt->data;
140 int buf_size = avpkt->size;
139 CamStudioContext *c = avctx->priv_data; 141 CamStudioContext *c = avctx->priv_data;
140 AVFrame *picture = data; 142 AVFrame *picture = data;
141 143
142 if (buf_size < 2) { 144 if (buf_size < 2) {
143 av_log(avctx, AV_LOG_ERROR, "coded frame too small\n"); 145 av_log(avctx, AV_LOG_ERROR, "coded frame too small\n");