comparison vp56.c @ 9356:2983bd7deaf5 libavcodec

fix vp5/vp6 decoding by using new prototype for decode function
author aurel
date Tue, 07 Apr 2009 18:24:47 +0000
parents bf4b7bde40ab
children c1cccc058c7a
comparison
equal deleted inserted replaced
9355:54bc8a2727b0 9356:2983bd7deaf5
493 493
494 return 0; 494 return 0;
495 } 495 }
496 496
497 int vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size, 497 int vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
498 const uint8_t *buf, int buf_size) 498 AVPacket *avpkt)
499 { 499 {
500 const uint8_t *buf = avpkt->data;
500 VP56Context *s = avctx->priv_data; 501 VP56Context *s = avctx->priv_data;
501 AVFrame *const p = s->framep[VP56_FRAME_CURRENT]; 502 AVFrame *const p = s->framep[VP56_FRAME_CURRENT];
502 int remaining_buf_size = buf_size; 503 int remaining_buf_size = avpkt->size;
503 int is_alpha, av_uninit(alpha_offset); 504 int is_alpha, av_uninit(alpha_offset);
504 505
505 if (s->has_alpha) { 506 if (s->has_alpha) {
506 alpha_offset = bytestream_get_be24(&buf); 507 alpha_offset = bytestream_get_be24(&buf);
507 remaining_buf_size -= 3; 508 remaining_buf_size -= 3;
639 s->framep[VP56_FRAME_PREVIOUS]); 640 s->framep[VP56_FRAME_PREVIOUS]);
640 641
641 *(AVFrame*)data = *p; 642 *(AVFrame*)data = *p;
642 *data_size = sizeof(AVFrame); 643 *data_size = sizeof(AVFrame);
643 644
644 return buf_size; 645 return avpkt->size;
645 } 646 }
646 647
647 av_cold void vp56_init(AVCodecContext *avctx, int flip, int has_alpha) 648 av_cold void vp56_init(AVCodecContext *avctx, int flip, int has_alpha)
648 { 649 {
649 VP56Context *s = avctx->priv_data; 650 VP56Context *s = avctx->priv_data;