]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/vb.c
Remove return statements following infinite loops without break
[ffmpeg] / libavcodec / vb.c
index f4f2ee1bfc5767b05f644845df48c91a7a4dca5f..fb372837648f5084cfda2b456e4c73d1172ba7da 100644 (file)
@@ -2,25 +2,25 @@
  * Beam Software VB decoder
  * Copyright (c) 2007 Konstantin Shishkov
  *
- * This file is part of FFmpeg.
+ * This file is part of Libav.
  *
- * FFmpeg is free software; you can redistribute it and/or
+ * Libav is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or (at your option) any later version.
  *
- * FFmpeg is distributed in the hope that it will be useful,
+ * Libav is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
+ * License along with Libav; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 /**
- * @file libavcodec/vb.c
+ * @file
  * VB Video decoder
  */
 
@@ -43,7 +43,7 @@ typedef struct VBDecContext {
     AVFrame pic;
 
     uint8_t *frame, *prev_frame;
-    uint32_t pal[256];
+    uint32_t pal[AVPALETTE_COUNT];
     const uint8_t *stream;
 } VBDecContext;
 
@@ -272,8 +272,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
     c->frame      = av_mallocz(avctx->width * avctx->height);
     c->prev_frame = av_mallocz(avctx->width * avctx->height);
 
-    memset(c->pal, 0, sizeof(c->pal));
-
     return 0;
 }
 
@@ -289,9 +287,9 @@ static av_cold int decode_end(AVCodecContext *avctx)
     return 0;
 }
 
-AVCodec vb_decoder = {
+AVCodec ff_vb_decoder = {
     "vb",
-    CODEC_TYPE_VIDEO,
+    AVMEDIA_TYPE_VIDEO,
     CODEC_ID_VB,
     sizeof(VBDecContext),
     decode_init,