comparison dca_parser.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 983533ccc393
children 48759bfbd073
comparison
equal deleted inserted replaced
4930:655d25351bfc 4931:0d1cc37d9430
92 return 0; 92 return 0;
93 } 93 }
94 94
95 static int dca_parse(AVCodecParserContext * s, 95 static int dca_parse(AVCodecParserContext * s,
96 AVCodecContext * avctx, 96 AVCodecContext * avctx,
97 uint8_t ** poutbuf, int *poutbuf_size, 97 const uint8_t ** poutbuf, int *poutbuf_size,
98 const uint8_t * buf, int buf_size) 98 const uint8_t * buf, int buf_size)
99 { 99 {
100 DCAParseContext *pc1 = s->priv_data; 100 DCAParseContext *pc1 = s->priv_data;
101 ParseContext *pc = &pc1->pc; 101 ParseContext *pc = &pc1->pc;
102 int next; 102 int next;
104 if (s->flags & PARSER_FLAG_COMPLETE_FRAMES) { 104 if (s->flags & PARSER_FLAG_COMPLETE_FRAMES) {
105 next = buf_size; 105 next = buf_size;
106 } else { 106 } else {
107 next = dca_find_frame_end(pc1, buf, buf_size); 107 next = dca_find_frame_end(pc1, buf, buf_size);
108 108
109 if (ff_combine_frame(pc, next, (uint8_t **) & buf, &buf_size) < 0) { 109 if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) {
110 *poutbuf = NULL; 110 *poutbuf = NULL;
111 *poutbuf_size = 0; 111 *poutbuf_size = 0;
112 return buf_size; 112 return buf_size;
113 } 113 }
114 } 114 }
115 *poutbuf = (uint8_t *) buf; 115 *poutbuf = buf;
116 *poutbuf_size = buf_size; 116 *poutbuf_size = buf_size;
117 return next; 117 return next;
118 } 118 }
119 119
120 AVCodecParser dca_parser = { 120 AVCodecParser dca_parser = {