Commit 5f0f7713 authored by Zdenek Kabelac's avatar Zdenek Kabelac

* more consts

Originally committed as revision 2847 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 49a37411
...@@ -1768,9 +1768,9 @@ static int mpeg_decode_init(AVCodecContext *avctx) ...@@ -1768,9 +1768,9 @@ static int mpeg_decode_init(AVCodecContext *avctx)
/* return the 8 bit start code value and update the search /* return the 8 bit start code value and update the search
state. Return -1 if no start code found */ 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; unsigned int state=0xFFFFFFFF, v;
int val; int val;
...@@ -1791,7 +1791,7 @@ static int find_start_code(uint8_t **pbuf_ptr, uint8_t *buf_end) ...@@ -1791,7 +1791,7 @@ static int find_start_code(uint8_t **pbuf_ptr, uint8_t *buf_end)
} }
static int mpeg1_decode_picture(AVCodecContext *avctx, 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; Mpeg1Context *s1 = avctx->priv_data;
MpegEncContext *s = &s1->mpeg_enc_ctx; MpegEncContext *s = &s1->mpeg_enc_ctx;
...@@ -2019,7 +2019,7 @@ static void mpeg_decode_picture_coding_extension(MpegEncContext *s) ...@@ -2019,7 +2019,7 @@ static void mpeg_decode_picture_coding_extension(MpegEncContext *s)
} }
static void mpeg_decode_extension(AVCodecContext *avctx, 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; Mpeg1Context *s1 = avctx->priv_data;
MpegEncContext *s = &s1->mpeg_enc_ctx; MpegEncContext *s = &s1->mpeg_enc_ctx;
...@@ -2114,7 +2114,7 @@ static int mpeg_field_start(MpegEncContext *s){ ...@@ -2114,7 +2114,7 @@ static int mpeg_field_start(MpegEncContext *s){
* DECODE_SLICE_OK if this slice is ok<br> * DECODE_SLICE_OK if this slice is ok<br>
*/ */
static int mpeg_decode_slice(Mpeg1Context *s1, int mb_y, 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; MpegEncContext *s = &s1->mpeg_enc_ctx;
AVCodecContext *avctx= s->avctx; AVCodecContext *avctx= s->avctx;
...@@ -2365,7 +2365,7 @@ static int slice_end(AVCodecContext *avctx, AVFrame *pict) ...@@ -2365,7 +2365,7 @@ static int slice_end(AVCodecContext *avctx, AVFrame *pict)
} }
static int mpeg1_decode_sequence(AVCodecContext *avctx, 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; Mpeg1Context *s1 = avctx->priv_data;
MpegEncContext *s = &s1->mpeg_enc_ctx; MpegEncContext *s = &s1->mpeg_enc_ctx;
...@@ -2584,7 +2584,7 @@ static void mpeg_decode_user_data(AVCodecContext *avctx, ...@@ -2584,7 +2584,7 @@ static void mpeg_decode_user_data(AVCodecContext *avctx,
} }
static void mpeg_decode_gop(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; Mpeg1Context *s1 = avctx->priv_data;
MpegEncContext *s = &s1->mpeg_enc_ctx; MpegEncContext *s = &s1->mpeg_enc_ctx;
...@@ -2659,7 +2659,8 @@ static int mpeg_decode_frame(AVCodecContext *avctx, ...@@ -2659,7 +2659,8 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
uint8_t *buf, int buf_size) uint8_t *buf, int buf_size)
{ {
Mpeg1Context *s = avctx->priv_data; 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; int ret, start_code, input_size;
AVFrame *picture = data; AVFrame *picture = data;
MpegEncContext *s2 = &s->mpeg_enc_ctx; MpegEncContext *s2 = &s->mpeg_enc_ctx;
...@@ -2733,13 +2734,13 @@ static int mpeg_decode_frame(AVCodecContext *avctx, ...@@ -2733,13 +2734,13 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
switch(start_code) { switch(start_code) {
case SEQ_START_CODE: case SEQ_START_CODE:
mpeg1_decode_sequence(avctx, buf_ptr, mpeg1_decode_sequence(avctx, buf_ptr,
input_size); input_size);
break; break;
case PICTURE_START_CODE: case PICTURE_START_CODE:
/* we have a complete image : we try to decompress it */ /* we have a complete image : we try to decompress it */
mpeg1_decode_picture(avctx, mpeg1_decode_picture(avctx,
buf_ptr, input_size); buf_ptr, input_size);
break; break;
case EXT_START_CODE: case EXT_START_CODE:
mpeg_decode_extension(avctx, mpeg_decode_extension(avctx,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment