]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/txd.c
Typo
[ffmpeg] / libavcodec / txd.c
index 454e412955aede1e1fab22bbb7103b8f0d3ca5eb..13e1938bb5ee873a9cd5d2d8809669a931d31b23 100644 (file)
@@ -2,6 +2,8 @@
  * Renderware TeXture Dictionary (.txd) image decoder
  * Copyright (c) 2007 Ivo van Poorten
  *
+ * See also: http://wiki.multimedia.cx/index.php?title=TXD
+ *
  * This file is part of FFmpeg.
  *
  * FFmpeg is free software; you can redistribute it and/or
@@ -17,8 +19,6 @@
  * 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 Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * See also: http://wiki.multimedia.cx/index.php?title=TXD
  */
 
 #include "avcodec.h"
@@ -33,20 +33,21 @@ static int txd_init(AVCodecContext *avctx) {
 
     avcodec_get_frame_defaults(&s->picture);
     avctx->coded_frame = &s->picture;
-    s->picture.data[0] = NULL;
 
     return 0;
 }
 
 static int txd_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
-                            uint8_t *buf, int buf_size) {
+                            const uint8_t *buf, int buf_size) {
     TXDContext * const s = avctx->priv_data;
     AVFrame *picture = data;
     AVFrame * const p = &s->picture;
     unsigned int version, w, h, d3d_format, depth, stride, mipmap_count, flags;
     unsigned int y, v;
-    uint8_t *ptr, *cur = buf;
-    uint32_t *palette = (uint32_t *)(cur + 88), *pal;
+    uint8_t *ptr;
+    const uint8_t *cur = buf;
+    const uint32_t *palette = (const uint32_t *)(cur + 88);
+    uint32_t *pal;
 
     version         = AV_RL32(cur);
     d3d_format      = AV_RL32(cur+76);