diff options
author | Zdenek Kabelac <kabi@informatics.muni.cz> | 2004-03-05 14:21:56 +0000 |
---|---|---|
committer | Zdenek Kabelac <kabi@informatics.muni.cz> | 2004-03-05 14:21:56 +0000 |
commit | 5f0f7713ad757c75c24c7ecf782266feee6e55e8 (patch) | |
tree | 9058bb849bc0c8902a3c73d44e11264372f8a026 /libavcodec/mpeg12.c | |
parent | 49a37411f369a3ab391243c46b24bb9e346b3aaf (diff) | |
download | ffmpeg-5f0f7713ad757c75c24c7ecf782266feee6e55e8.tar.gz |
* more consts
Originally committed as revision 2847 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/mpeg12.c')
-rw-r--r-- | libavcodec/mpeg12.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index 9bde714d62..1bf66e7896 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -1768,9 +1768,9 @@ static int mpeg_decode_init(AVCodecContext *avctx) /* return the 8 bit start code value and update the search state. Return -1 if no start code found */ -static int find_start_code(uint8_t **pbuf_ptr, uint8_t *buf_end) +static int find_start_code(const uint8_t **pbuf_ptr, const uint8_t *buf_end) { - uint8_t *buf_ptr; + const uint8_t *buf_ptr; unsigned int state=0xFFFFFFFF, v; int val; @@ -1791,7 +1791,7 @@ static int find_start_code(uint8_t **pbuf_ptr, uint8_t *buf_end) } static int mpeg1_decode_picture(AVCodecContext *avctx, - uint8_t *buf, int buf_size) + const uint8_t *buf, int buf_size) { Mpeg1Context *s1 = avctx->priv_data; MpegEncContext *s = &s1->mpeg_enc_ctx; @@ -2019,7 +2019,7 @@ static void mpeg_decode_picture_coding_extension(MpegEncContext *s) } static void mpeg_decode_extension(AVCodecContext *avctx, - uint8_t *buf, int buf_size) + const uint8_t *buf, int buf_size) { Mpeg1Context *s1 = avctx->priv_data; MpegEncContext *s = &s1->mpeg_enc_ctx; @@ -2114,7 +2114,7 @@ static int mpeg_field_start(MpegEncContext *s){ * DECODE_SLICE_OK if this slice is ok<br> */ static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y, - uint8_t **buf, int buf_size) + const uint8_t **buf, int buf_size) { MpegEncContext *s = &s1->mpeg_enc_ctx; AVCodecContext *avctx= s->avctx; @@ -2365,7 +2365,7 @@ static int slice_end(AVCodecContext *avctx, AVFrame *pict) } static int mpeg1_decode_sequence(AVCodecContext *avctx, - uint8_t *buf, int buf_size) + const uint8_t *buf, int buf_size) { Mpeg1Context *s1 = avctx->priv_data; MpegEncContext *s = &s1->mpeg_enc_ctx; @@ -2584,7 +2584,7 @@ static void mpeg_decode_user_data(AVCodecContext *avctx, } static void mpeg_decode_gop(AVCodecContext *avctx, - uint8_t *buf, int buf_size){ + const uint8_t *buf, int buf_size){ Mpeg1Context *s1 = avctx->priv_data; MpegEncContext *s = &s1->mpeg_enc_ctx; @@ -2659,7 +2659,8 @@ static int mpeg_decode_frame(AVCodecContext *avctx, uint8_t *buf, int buf_size) { Mpeg1Context *s = avctx->priv_data; - uint8_t *buf_end, *buf_ptr; + const uint8_t *buf_end; + const uint8_t *buf_ptr; int ret, start_code, input_size; AVFrame *picture = data; MpegEncContext *s2 = &s->mpeg_enc_ctx; @@ -2733,13 +2734,13 @@ static int mpeg_decode_frame(AVCodecContext *avctx, switch(start_code) { case SEQ_START_CODE: mpeg1_decode_sequence(avctx, buf_ptr, - input_size); + input_size); break; case PICTURE_START_CODE: /* we have a complete image : we try to decompress it */ mpeg1_decode_picture(avctx, - buf_ptr, input_size); + buf_ptr, input_size); break; case EXT_START_CODE: mpeg_decode_extension(avctx, |