Mercurial > libavcodec.hg
comparison pngdec.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 | cd207441ca56 |
comparison
equal
deleted
inserted
replaced
9354:174309386512 | 9355:54bc8a2727b0 |
---|---|
377 return 0; | 377 return 0; |
378 } | 378 } |
379 | 379 |
380 static int decode_frame(AVCodecContext *avctx, | 380 static int decode_frame(AVCodecContext *avctx, |
381 void *data, int *data_size, | 381 void *data, int *data_size, |
382 const uint8_t *buf, int buf_size) | 382 AVPacket *avpkt) |
383 { | 383 { |
384 const uint8_t *buf = avpkt->data; | |
385 int buf_size = avpkt->size; | |
384 PNGDecContext * const s = avctx->priv_data; | 386 PNGDecContext * const s = avctx->priv_data; |
385 AVFrame *picture = data; | 387 AVFrame *picture = data; |
386 AVFrame * const p= &s->picture; | 388 AVFrame * const p= &s->picture; |
387 uint32_t tag, length; | 389 uint32_t tag, length; |
388 int ret, crc; | 390 int ret, crc; |