Mercurial > libavcodec.hg
comparison mpegaudio_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 | b0a24fa7cbea |
children | a5f6fbc9fa66 |
comparison
equal
deleted
inserted
replaced
4930:655d25351bfc | 4931:0d1cc37d9430 |
---|---|
48 return 0; | 48 return 0; |
49 } | 49 } |
50 | 50 |
51 static int mpegaudio_parse(AVCodecParserContext *s1, | 51 static int mpegaudio_parse(AVCodecParserContext *s1, |
52 AVCodecContext *avctx, | 52 AVCodecContext *avctx, |
53 uint8_t **poutbuf, int *poutbuf_size, | 53 const uint8_t **poutbuf, int *poutbuf_size, |
54 const uint8_t *buf, int buf_size) | 54 const uint8_t *buf, int buf_size) |
55 { | 55 { |
56 MpegAudioParseContext *s = s1->priv_data; | 56 MpegAudioParseContext *s = s1->priv_data; |
57 int len, ret, sr; | 57 int len, ret, sr; |
58 uint32_t header; | 58 uint32_t header; |
184 } | 184 } |
185 | 185 |
186 if(s->frame_size > 0 && buf_ptr - buf == s->inbuf_ptr - s->inbuf | 186 if(s->frame_size > 0 && buf_ptr - buf == s->inbuf_ptr - s->inbuf |
187 && buf_size + buf_ptr - buf >= s->frame_size){ | 187 && buf_size + buf_ptr - buf >= s->frame_size){ |
188 if(s->header_count > 0){ | 188 if(s->header_count > 0){ |
189 *poutbuf = (uint8_t *)buf; | 189 *poutbuf = buf; |
190 *poutbuf_size = s->frame_size; | 190 *poutbuf_size = s->frame_size; |
191 } | 191 } |
192 buf_ptr = buf + s->frame_size; | 192 buf_ptr = buf + s->frame_size; |
193 s->inbuf_ptr = s->inbuf; | 193 s->inbuf_ptr = s->inbuf; |
194 s->frame_size = 0; | 194 s->frame_size = 0; |