]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/avs.c
Correction of typo in aac_ac3_parser
[ffmpeg] / libavcodec / avs.c
index 953aea1be055e9649781ed5132b8bba5092be225..b2c3e494229bdc8cb450e701783ef28b2b366435 100644 (file)
@@ -16,7 +16,7 @@
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include "avcodec.h"
@@ -44,12 +44,13 @@ typedef enum {
 
 static int
 avs_decode_frame(AVCodecContext * avctx,
-                 void *data, int *data_size, uint8_t * buf, int buf_size)
+                 void *data, int *data_size, const uint8_t * buf, int buf_size)
 {
     avs_context_t *const avs = avctx->priv_data;
     AVFrame *picture = data;
     AVFrame *const p = (AVFrame *) & avs->picture;
-    uint8_t *table, *vect, *out;
+    const uint8_t *table, *vect;
+    uint8_t *out;
     int i, j, x, y, stride, vect_w = 3, vect_h = 3;
     int sub_type;
     avs_block_type_t type;
@@ -74,8 +75,8 @@ avs_decode_frame(AVCodecContext * avctx,
         int first, last;
         uint32_t *pal = (uint32_t *) avs->picture.data[1];
 
-        first = LE_16(buf);
-        last = first + LE_16(buf + 2);
+        first = AV_RL16(buf);
+        last = first + AV_RL16(buf + 2);
         buf += 4;
         for (i=first; i<last; i++, buf+=3)
             pal[i] = (buf[0] << 18) | (buf[1] << 10) | (buf[2] << 2);
@@ -141,7 +142,7 @@ avs_decode_frame(AVCodecContext * avctx,
     return buf_size;
 }
 
-static int avs_decode_init(AVCodecContext * avctx)
+static av_cold int avs_decode_init(AVCodecContext * avctx)
 {
     avctx->pix_fmt = PIX_FMT_PAL8;
     return 0;