Mercurial > libavcodec.hg
comparison snow.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 | 6220870901f5 |
children | 48813960f5d5 |
comparison
equal
deleted
inserted
replaced
9354:174309386512 | 9355:54bc8a2727b0 |
---|---|
4481 common_init(avctx); | 4481 common_init(avctx); |
4482 | 4482 |
4483 return 0; | 4483 return 0; |
4484 } | 4484 } |
4485 | 4485 |
4486 static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, const uint8_t *buf, int buf_size){ | 4486 static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt){ |
4487 const uint8_t *buf = avpkt->data; | |
4488 int buf_size = avpkt->size; | |
4487 SnowContext *s = avctx->priv_data; | 4489 SnowContext *s = avctx->priv_data; |
4488 RangeCoder * const c= &s->c; | 4490 RangeCoder * const c= &s->c; |
4489 int bytes_read; | 4491 int bytes_read; |
4490 AVFrame *picture = data; | 4492 AVFrame *picture = data; |
4491 int level, orientation, plane_index, i; | 4493 int level, orientation, plane_index, i; |