Mercurial > libavcodec.hg
comparison gifdec.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 | 04423b2f6e0b |
children | a7a5ffa5774b |
comparison
equal
deleted
inserted
replaced
9354:174309386512 | 9355:54bc8a2727b0 |
---|---|
280 s->picture.data[0] = NULL; | 280 s->picture.data[0] = NULL; |
281 ff_lzw_decode_open(&s->lzw); | 281 ff_lzw_decode_open(&s->lzw); |
282 return 0; | 282 return 0; |
283 } | 283 } |
284 | 284 |
285 static int gif_decode_frame(AVCodecContext *avctx, void *data, int *data_size, const uint8_t *buf, int buf_size) | 285 static int gif_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) |
286 { | 286 { |
287 const uint8_t *buf = avpkt->data; | |
288 int buf_size = avpkt->size; | |
287 GifState *s = avctx->priv_data; | 289 GifState *s = avctx->priv_data; |
288 AVFrame *picture = data; | 290 AVFrame *picture = data; |
289 int ret; | 291 int ret; |
290 | 292 |
291 s->bytestream = buf; | 293 s->bytestream = buf; |