Mercurial > libavcodec.hg
comparison pnm.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 | 79e3bf8af72c |
children | 95934eef9589 |
comparison
equal
deleted
inserted
replaced
4930:655d25351bfc | 4931:0d1cc37d9430 |
---|---|
487 #endif | 487 #endif |
488 | 488 |
489 #ifdef CONFIG_PNM_PARSER | 489 #ifdef CONFIG_PNM_PARSER |
490 static int pnm_parse(AVCodecParserContext *s, | 490 static int pnm_parse(AVCodecParserContext *s, |
491 AVCodecContext *avctx, | 491 AVCodecContext *avctx, |
492 uint8_t **poutbuf, int *poutbuf_size, | 492 const uint8_t **poutbuf, int *poutbuf_size, |
493 const uint8_t *buf, int buf_size) | 493 const uint8_t *buf, int buf_size) |
494 { | 494 { |
495 ParseContext *pc = s->priv_data; | 495 ParseContext *pc = s->priv_data; |
496 PNMContext pnmctx; | 496 PNMContext pnmctx; |
497 int next; | 497 int next; |
536 next-= pc->index; | 536 next-= pc->index; |
537 if(next > buf_size) | 537 if(next > buf_size) |
538 next= END_NOT_FOUND; | 538 next= END_NOT_FOUND; |
539 } | 539 } |
540 | 540 |
541 if(ff_combine_frame(pc, next, (uint8_t **)&buf, &buf_size)<0){ | 541 if(ff_combine_frame(pc, next, &buf, &buf_size)<0){ |
542 *poutbuf = NULL; | 542 *poutbuf = NULL; |
543 *poutbuf_size = 0; | 543 *poutbuf_size = 0; |
544 return buf_size; | 544 return buf_size; |
545 } | 545 } |
546 *poutbuf = (uint8_t *)buf; | 546 *poutbuf = buf; |
547 *poutbuf_size = buf_size; | 547 *poutbuf_size = buf_size; |
548 return next; | 548 return next; |
549 } | 549 } |
550 | 550 |
551 AVCodecParser pnm_parser = { | 551 AVCodecParser pnm_parser = { |