Mercurial > libavcodec.hg
comparison libfaad.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 | cfe1aeeb86ed |
| children | d9cadef1412d |
comparison
equal
deleted
inserted
replaced
| 9354:174309386512 | 9355:54bc8a2727b0 |
|---|---|
| 147 return r; | 147 return r; |
| 148 } | 148 } |
| 149 | 149 |
| 150 static int faac_decode_frame(AVCodecContext *avctx, | 150 static int faac_decode_frame(AVCodecContext *avctx, |
| 151 void *data, int *data_size, | 151 void *data, int *data_size, |
| 152 uint8_t *buf, int buf_size) | 152 AVPacket *avpkt) |
| 153 { | 153 { |
| 154 const uint8_t *buf = avpkt->data; | |
| 155 int buf_size = avpkt->size; | |
| 154 FAACContext *s = avctx->priv_data; | 156 FAACContext *s = avctx->priv_data; |
| 155 #ifndef FAAD2_VERSION | 157 #ifndef FAAD2_VERSION |
| 156 unsigned long bytesconsumed; | 158 unsigned long bytesconsumed; |
| 157 short *sample_buffer = NULL; | 159 short *sample_buffer = NULL; |
| 158 unsigned long samples; | 160 unsigned long samples; |
