#include "avcodec.h"
#include "msrledec.h"
-static int msrle_decode_pal4(AVCodecContext *avctx, AVPicture *pic,
+static int msrle_decode_pal4(AVCodecContext *avctx, AVFrame *pic,
GetByteContext *gb)
{
unsigned char rle_code;
unsigned int pixel_ptr = 0;
int row_dec = pic->linesize[0];
int row_ptr = (avctx->height - 1) * row_dec;
- int frame_size = row_dec * avctx->height;
+ int frame_size = FFABS(row_dec) * avctx->height;
int i;
while (row_ptr >= 0) {
}
-static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVPicture *pic,
+static int msrle_decode_8_16_24_32(AVCodecContext *avctx, AVFrame *pic,
int depth, GetByteContext *gb)
{
uint8_t *output, *output_end;
}
-int ff_msrle_decode(AVCodecContext *avctx, AVPicture *pic,
+int ff_msrle_decode(AVCodecContext *avctx, AVFrame *pic,
int depth, GetByteContext *gb)
{
switch(depth){