]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/tscc.c
Simplify ptr[0]; ptr++; to *ptr++
[ffmpeg] / libavcodec / tscc.c
index e379abbbf8d4e16b6c2dee4e74e61bff24e26a50..cc284088a596d080378e1e288b7b748bb5b4de1f 100644 (file)
@@ -186,7 +186,7 @@ static int decode_rle(CamtasiaContext *c, unsigned int srcsize)
  */
 static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size)
 {
-    CamtasiaContext * const c = (CamtasiaContext *)avctx->priv_data;
+    CamtasiaContext * const c = avctx->priv_data;
     unsigned char *encoded = (unsigned char *)buf;
     unsigned char *outptr;
 #ifdef CONFIG_ZLIB
@@ -257,11 +257,10 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8
  */
 static int decode_init(AVCodecContext *avctx)
 {
-    CamtasiaContext * const c = (CamtasiaContext *)avctx->priv_data;
+    CamtasiaContext * const c = avctx->priv_data;
     int zret; // Zlib return code
 
     c->avctx = avctx;
-    avctx->has_b_frames = 0;
 
     c->pic.data[0] = NULL;
     c->height = avctx->height;
@@ -283,7 +282,7 @@ static int decode_init(AVCodecContext *avctx)
     case 24:
              avctx->pix_fmt = PIX_FMT_BGR24;
              break;
-    case 32: avctx->pix_fmt = PIX_FMT_RGBA32; break;
+    case 32: avctx->pix_fmt = PIX_FMT_RGB32; break;
     default: av_log(avctx, AV_LOG_ERROR, "Camtasia error: unknown depth %i bpp\n", avctx->bits_per_sample);
              return -1;
     }
@@ -321,7 +320,7 @@ static int decode_init(AVCodecContext *avctx)
  */
 static int decode_end(AVCodecContext *avctx)
 {
-    CamtasiaContext * const c = (CamtasiaContext *)avctx->priv_data;
+    CamtasiaContext * const c = avctx->priv_data;
 
     av_freep(&c->decomp_buf);