Mercurial > libavcodec.hg
comparison xan.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 | e38284cd69dc |
comparison
equal
deleted
inserted
replaced
9354:174309386512 | 9355:54bc8a2727b0 |
---|---|
403 static void xan_wc4_decode_frame(XanContext *s) { | 403 static void xan_wc4_decode_frame(XanContext *s) { |
404 } | 404 } |
405 | 405 |
406 static int xan_decode_frame(AVCodecContext *avctx, | 406 static int xan_decode_frame(AVCodecContext *avctx, |
407 void *data, int *data_size, | 407 void *data, int *data_size, |
408 const uint8_t *buf, int buf_size) | 408 AVPacket *avpkt) |
409 { | 409 { |
410 const uint8_t *buf = avpkt->data; | |
411 int buf_size = avpkt->size; | |
410 XanContext *s = avctx->priv_data; | 412 XanContext *s = avctx->priv_data; |
411 AVPaletteControl *palette_control = avctx->palctrl; | 413 AVPaletteControl *palette_control = avctx->palctrl; |
412 | 414 |
413 if (avctx->get_buffer(avctx, &s->current_frame)) { | 415 if (avctx->get_buffer(avctx, &s->current_frame)) { |
414 av_log(s->avctx, AV_LOG_ERROR, " Xan Video: get_buffer() failed\n"); | 416 av_log(s->avctx, AV_LOG_ERROR, " Xan Video: get_buffer() failed\n"); |