Mercurial > libavcodec.hg
comparison bethsoftvideo.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 | e9d9d946f213 |
children | f31c21164e58 |
comparison
equal
deleted
inserted
replaced
9354:174309386512 | 9355:54bc8a2727b0 |
---|---|
56 frame->palette_has_changed = 1; | 56 frame->palette_has_changed = 1; |
57 } | 57 } |
58 | 58 |
59 static int bethsoftvid_decode_frame(AVCodecContext *avctx, | 59 static int bethsoftvid_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 BethsoftvidContext * vid = avctx->priv_data; | 65 BethsoftvidContext * vid = avctx->priv_data; |
64 char block_type; | 66 char block_type; |
65 uint8_t * dst; | 67 uint8_t * dst; |
66 uint8_t * frame_end; | 68 uint8_t * frame_end; |
67 int remaining = avctx->width; // number of bytes remaining on a line | 69 int remaining = avctx->width; // number of bytes remaining on a line |