comparison mjpeg.c @ 4931:0d1cc37d9430 libavcodec

make some parser parameters const to avoid casting const to non-const
author aurel
date Mon, 07 May 2007 00:47:03 +0000
parents 36c3e5333a44
children 9d7c1fbd3359
comparison
equal deleted inserted replaced
4930:655d25351bfc 4931:0d1cc37d9430
1003 return END_NOT_FOUND; 1003 return END_NOT_FOUND;
1004 } 1004 }
1005 1005
1006 static int jpeg_parse(AVCodecParserContext *s, 1006 static int jpeg_parse(AVCodecParserContext *s,
1007 AVCodecContext *avctx, 1007 AVCodecContext *avctx,
1008 uint8_t **poutbuf, int *poutbuf_size, 1008 const uint8_t **poutbuf, int *poutbuf_size,
1009 const uint8_t *buf, int buf_size) 1009 const uint8_t *buf, int buf_size)
1010 { 1010 {
1011 ParseContext *pc = s->priv_data; 1011 ParseContext *pc = s->priv_data;
1012 int next; 1012 int next;
1013 1013
1014 next= find_frame_end(pc, buf, buf_size); 1014 next= find_frame_end(pc, buf, buf_size);
1015 1015
1016 if (ff_combine_frame(pc, next, (uint8_t **)&buf, &buf_size) < 0) { 1016 if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) {
1017 *poutbuf = NULL; 1017 *poutbuf = NULL;
1018 *poutbuf_size = 0; 1018 *poutbuf_size = 0;
1019 return buf_size; 1019 return buf_size;
1020 } 1020 }
1021 1021
1022 *poutbuf = (uint8_t *)buf; 1022 *poutbuf = buf;
1023 *poutbuf_size = buf_size; 1023 *poutbuf_size = buf_size;
1024 return next; 1024 return next;
1025 } 1025 }
1026 1026
1027 /* quantize tables */ 1027 /* quantize tables */