comparison sunrast.c @ 6254:5b6f78cd3d50 libavcodec

const
author michael
date Fri, 01 Feb 2008 14:16:08 +0000
parents e458d5374a03
children 48759bfbd073
comparison
equal deleted inserted replaced
6253:cffdb71f0930 6254:5b6f78cd3d50
40 40
41 return 0; 41 return 0;
42 } 42 }
43 43
44 static int sunrast_decode_frame(AVCodecContext *avctx, void *data, 44 static int sunrast_decode_frame(AVCodecContext *avctx, void *data,
45 int *data_size, uint8_t *buf, int buf_size) { 45 int *data_size, const uint8_t *buf, int buf_size) {
46 SUNRASTContext * const s = avctx->priv_data; 46 SUNRASTContext * const s = avctx->priv_data;
47 AVFrame *picture = data; 47 AVFrame *picture = data;
48 AVFrame * const p = &s->picture; 48 AVFrame * const p = &s->picture;
49 unsigned int w, h, depth, type, maptype, maplength, stride, x, y, len, alen; 49 unsigned int w, h, depth, type, maptype, maplength, stride, x, y, len, alen;
50 uint8_t *ptr, *bufstart = buf; 50 uint8_t *ptr;
51 const uint8_t *bufstart = buf;
51 52
52 if (AV_RB32(buf) != 0x59a66a95) { 53 if (AV_RB32(buf) != 0x59a66a95) {
53 av_log(avctx, AV_LOG_ERROR, "this is not sunras encoded data\n"); 54 av_log(avctx, AV_LOG_ERROR, "this is not sunras encoded data\n");
54 return -1; 55 return -1;
55 } 56 }