Mercurial > libavcodec.hg
comparison wnv1.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 | 66f5d619a8b3 |
children | 25b3650b4db5 |
comparison
equal
deleted
inserted
replaced
9354:174309386512 | 9355:54bc8a2727b0 |
---|---|
56 return base_value + ((v - 7)<<w->shift); | 56 return base_value + ((v - 7)<<w->shift); |
57 } | 57 } |
58 | 58 |
59 static int decode_frame(AVCodecContext *avctx, | 59 static int decode_frame(AVCodecContext *avctx, |
60 void *data, int *data_size, | 60 void *data, int *data_size, |
61 const uint8_t *buf, int buf_size) | 61 AVPacket *avpkt) |
62 { | 62 { |
63 const uint8_t *buf = avpkt->data; | |
64 int buf_size = avpkt->size; | |
63 WNV1Context * const l = avctx->priv_data; | 65 WNV1Context * const l = avctx->priv_data; |
64 AVFrame * const p= (AVFrame*)&l->pic; | 66 AVFrame * const p= (AVFrame*)&l->pic; |
65 unsigned char *Y,*U,*V; | 67 unsigned char *Y,*U,*V; |
66 int i, j; | 68 int i, j; |
67 int prev_y = 0, prev_u = 0, prev_v = 0; | 69 int prev_y = 0, prev_u = 0, prev_v = 0; |