Mercurial > libavcodec.hg
comparison rv34.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 | 5de43b1eb9f4 |
children | c9c23894f4ae |
comparison
equal
deleted
inserted
replaced
9354:174309386512 | 9355:54bc8a2727b0 |
---|---|
1368 else return AV_RL32(buf + n*8 - 4) == 1 ? AV_RL32(buf + n*8) : AV_RB32(buf + n*8); | 1368 else return AV_RL32(buf + n*8 - 4) == 1 ? AV_RL32(buf + n*8) : AV_RB32(buf + n*8); |
1369 } | 1369 } |
1370 | 1370 |
1371 int ff_rv34_decode_frame(AVCodecContext *avctx, | 1371 int ff_rv34_decode_frame(AVCodecContext *avctx, |
1372 void *data, int *data_size, | 1372 void *data, int *data_size, |
1373 const uint8_t *buf, int buf_size) | 1373 AVPacket *avpkt) |
1374 { | 1374 { |
1375 const uint8_t *buf = avpkt->data; | |
1376 int buf_size = avpkt->size; | |
1375 RV34DecContext *r = avctx->priv_data; | 1377 RV34DecContext *r = avctx->priv_data; |
1376 MpegEncContext *s = &r->s; | 1378 MpegEncContext *s = &r->s; |
1377 AVFrame *pict = data; | 1379 AVFrame *pict = data; |
1378 SliceInfo si; | 1380 SliceInfo si; |
1379 int i; | 1381 int i; |