Mercurial > libavcodec.hg
comparison 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 | b7bde71aa752 |
| children | c3ee5c30c297 |
comparison
equal
deleted
inserted
replaced
| 4930:655d25351bfc | 4931:0d1cc37d9430 |
|---|---|
| 128 s->cur_frame_dts[k] = AV_NOPTS_VALUE; | 128 s->cur_frame_dts[k] = AV_NOPTS_VALUE; |
| 129 } | 129 } |
| 130 } | 130 } |
| 131 | 131 |
| 132 /* WARNING: the returned index can be negative */ | 132 /* WARNING: the returned index can be negative */ |
| 133 index = s->parser->parser_parse(s, avctx, poutbuf, poutbuf_size, buf, buf_size); | 133 index = s->parser->parser_parse(s, avctx, (const uint8_t **)poutbuf, poutbuf_size, buf, buf_size); |
| 134 //av_log(NULL, AV_LOG_DEBUG, "parser: in:%"PRId64", %"PRId64", out:%"PRId64", %"PRId64", in:%d out:%d id:%d\n", pts, dts, s->last_pts, s->last_dts, buf_size, *poutbuf_size, avctx->codec_id); | 134 //av_log(NULL, AV_LOG_DEBUG, "parser: in:%"PRId64", %"PRId64", out:%"PRId64", %"PRId64", in:%d out:%d id:%d\n", pts, dts, s->last_pts, s->last_dts, buf_size, *poutbuf_size, avctx->codec_id); |
| 135 /* update the file pointer */ | 135 /* update the file pointer */ |
| 136 if (*poutbuf_size) { | 136 if (*poutbuf_size) { |
| 137 /* fill the data for the current frame */ | 137 /* fill the data for the current frame */ |
| 138 s->frame_offset = s->last_frame_offset; | 138 s->frame_offset = s->last_frame_offset; |
| 221 | 221 |
| 222 /** | 222 /** |
| 223 * combines the (truncated) bitstream to a complete frame | 223 * combines the (truncated) bitstream to a complete frame |
| 224 * @returns -1 if no complete frame could be created | 224 * @returns -1 if no complete frame could be created |
| 225 */ | 225 */ |
| 226 int ff_combine_frame(ParseContext *pc, int next, uint8_t **buf, int *buf_size) | 226 int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size) |
| 227 { | 227 { |
| 228 #if 0 | 228 #if 0 |
| 229 if(pc->overread){ | 229 if(pc->overread){ |
| 230 printf("overread %d, state:%X next:%d index:%d o_index:%d\n", pc->overread, pc->state, next, pc->index, pc->overread_index); | 230 printf("overread %d, state:%X next:%d index:%d o_index:%d\n", pc->overread, pc->state, next, pc->index, pc->overread_index); |
| 231 printf("%X %X %X %X\n", (*buf)[0], (*buf)[1],(*buf)[2],(*buf)[3]); | 231 printf("%X %X %X %X\n", (*buf)[0], (*buf)[1],(*buf)[2],(*buf)[3]); |
| 523 #endif | 523 #endif |
| 524 | 524 |
| 525 /* also used for ADTS AAC */ | 525 /* also used for ADTS AAC */ |
| 526 static int ac3_parse(AVCodecParserContext *s1, | 526 static int ac3_parse(AVCodecParserContext *s1, |
| 527 AVCodecContext *avctx, | 527 AVCodecContext *avctx, |
| 528 uint8_t **poutbuf, int *poutbuf_size, | 528 const uint8_t **poutbuf, int *poutbuf_size, |
| 529 const uint8_t *buf, int buf_size) | 529 const uint8_t *buf, int buf_size) |
| 530 { | 530 { |
| 531 AC3ParseContext *s = s1->priv_data; | 531 AC3ParseContext *s = s1->priv_data; |
| 532 const uint8_t *buf_ptr; | 532 const uint8_t *buf_ptr; |
| 533 int len, sample_rate, bit_rate, channels, samples; | 533 int len, sample_rate, bit_rate, channels, samples; |
