[FFmpeg-cvslog] r11757 - trunk/libavcodec/bmp.c

michael subversion
Fri Feb 1 16:01:05 CET 2008


Author: michael
Date: Fri Feb  1 16:01:05 2008
New Revision: 11757

Log:
const


Modified:
   trunk/libavcodec/bmp.c

Modified: trunk/libavcodec/bmp.c
==============================================================================
--- trunk/libavcodec/bmp.c	(original)
+++ trunk/libavcodec/bmp.c	Fri Feb  1 16:01:05 2008
@@ -34,7 +34,7 @@ static int bmp_decode_init(AVCodecContex
 
 static int bmp_decode_frame(AVCodecContext *avctx,
                             void *data, int *data_size,
-                            uint8_t *buf, int buf_size)
+                            const uint8_t *buf, int buf_size)
 {
     BMPContext *s = avctx->priv_data;
     AVFrame *picture = data;
@@ -48,7 +48,7 @@ static int bmp_decode_frame(AVCodecConte
     uint32_t rgb[3];
     uint8_t *ptr;
     int dsize;
-    uint8_t *buf0 = buf;
+    const uint8_t *buf0 = buf;
 
     if(buf_size < 14){
         av_log(avctx, AV_LOG_ERROR, "buf size too small (%d)\n", buf_size);
@@ -193,7 +193,7 @@ static int bmp_decode_frame(AVCodecConte
         break;
     case 16:
         for(i = 0; i < avctx->height; i++){
-            uint16_t *src = (uint16_t *) buf;
+            const uint16_t *src = (const uint16_t *) buf;
             uint16_t *dst = (uint16_t *) ptr;
 
             for(j = 0; j < avctx->width; j++)
@@ -205,7 +205,7 @@ static int bmp_decode_frame(AVCodecConte
         break;
     case 32:
         for(i = 0; i < avctx->height; i++){
-            uint8_t *src = buf;
+            const uint8_t *src = buf;
             uint8_t *dst = ptr;
 
             for(j = 0; j < avctx->width; j++){




More information about the ffmpeg-cvslog mailing list