summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-02-01 03:40:46 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-02-01 03:40:46 +0000
commit2b3c8f8a6a67ab52ce8be9ac803eb8619d4243f2 (patch)
tree91802c158699fb8692dad7250c9fe9d44a20aded /libavcodec
parentb5777b942d3ccfe841ca1e1644c2d5daaadd1ff4 (diff)
const
Originally committed as revision 11712 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mjpegdec.c12
-rw-r--r--libavcodec/mjpegdec.h2
2 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index ea9e4ccf55..e4184d54b6 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -1073,9 +1073,9 @@ static int valid_marker_list[] =
/* return the 8 bit start code value and update the search
state. Return -1 if no start code found */
-static int find_marker(uint8_t **pbuf_ptr, uint8_t *buf_end)
+static int find_marker(const uint8_t **pbuf_ptr, const uint8_t *buf_end)
{
- uint8_t *buf_ptr;
+ const uint8_t *buf_ptr;
unsigned int v, v2;
int val;
#ifdef DEBUG
@@ -1105,10 +1105,10 @@ found:
int ff_mjpeg_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
- uint8_t *buf, int buf_size)
+ const uint8_t *buf, int buf_size)
{
MJpegDecodeContext *s = avctx->priv_data;
- uint8_t *buf_end, *buf_ptr;
+ const uint8_t *buf_end, *buf_ptr;
int start_code;
AVFrame *picture = data;
@@ -1136,7 +1136,7 @@ int ff_mjpeg_decode_frame(AVCodecContext *avctx,
/* unescape buffer of SOS, use special treatment for JPEG-LS */
if (start_code == SOS && !s->ls)
{
- uint8_t *src = buf_ptr;
+ const uint8_t *src = buf_ptr;
uint8_t *dst = s->buffer;
while (src<buf_end)
@@ -1163,7 +1163,7 @@ int ff_mjpeg_decode_frame(AVCodecContext *avctx,
(buf_end - buf_ptr) - (dst - s->buffer));
}
else if(start_code == SOS && s->ls){
- uint8_t *src = buf_ptr;
+ const uint8_t *src = buf_ptr;
uint8_t *dst = s->buffer;
int bit_count = 0;
int t = 0, b = 0;
diff --git a/libavcodec/mjpegdec.h b/libavcodec/mjpegdec.h
index c00cd4e438..d97b176a95 100644
--- a/libavcodec/mjpegdec.h
+++ b/libavcodec/mjpegdec.h
@@ -103,7 +103,7 @@ int ff_mjpeg_decode_init(AVCodecContext *avctx);
int ff_mjpeg_decode_end(AVCodecContext *avctx);
int ff_mjpeg_decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
- uint8_t *buf, int buf_size);
+ const uint8_t *buf, int buf_size);
int ff_mjpeg_decode_dqt(MJpegDecodeContext *s);
int ff_mjpeg_decode_dht(MJpegDecodeContext *s);
int ff_mjpeg_decode_sof(MJpegDecodeContext *s);