Mercurial > libavcodec.hg
comparison mpeg4video_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 | 5fc99f2a111b |
| children | 3fcb2f0d9ef1 |
comparison
equal
deleted
inserted
replaced
| 4930:655d25351bfc | 4931:0d1cc37d9430 |
|---|---|
| 63 return 0; | 63 return 0; |
| 64 } | 64 } |
| 65 | 65 |
| 66 static int mpeg4video_parse(AVCodecParserContext *s, | 66 static int mpeg4video_parse(AVCodecParserContext *s, |
| 67 AVCodecContext *avctx, | 67 AVCodecContext *avctx, |
| 68 uint8_t **poutbuf, int *poutbuf_size, | 68 const uint8_t **poutbuf, int *poutbuf_size, |
| 69 const uint8_t *buf, int buf_size) | 69 const uint8_t *buf, int buf_size) |
| 70 { | 70 { |
| 71 ParseContext *pc = s->priv_data; | 71 ParseContext *pc = s->priv_data; |
| 72 int next; | 72 int next; |
| 73 | 73 |
| 74 if(s->flags & PARSER_FLAG_COMPLETE_FRAMES){ | 74 if(s->flags & PARSER_FLAG_COMPLETE_FRAMES){ |
| 75 next= buf_size; | 75 next= buf_size; |
| 76 }else{ | 76 }else{ |
| 77 next= ff_mpeg4_find_frame_end(pc, buf, buf_size); | 77 next= ff_mpeg4_find_frame_end(pc, buf, buf_size); |
| 78 | 78 |
| 79 if (ff_combine_frame(pc, next, (uint8_t **)&buf, &buf_size) < 0) { | 79 if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) { |
| 80 *poutbuf = NULL; | 80 *poutbuf = NULL; |
| 81 *poutbuf_size = 0; | 81 *poutbuf_size = 0; |
| 82 return buf_size; | 82 return buf_size; |
| 83 } | 83 } |
| 84 } | 84 } |
| 85 av_mpeg4_decode_header(s, avctx, buf, buf_size); | 85 av_mpeg4_decode_header(s, avctx, buf, buf_size); |
| 86 | 86 |
| 87 *poutbuf = (uint8_t *)buf; | 87 *poutbuf = buf; |
| 88 *poutbuf_size = buf_size; | 88 *poutbuf_size = buf_size; |
| 89 return next; | 89 return next; |
| 90 } | 90 } |
| 91 | 91 |
| 92 | 92 |
