]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/gif.c
H.264: make filter_mb_fast support the case of unavailable top mb
[ffmpeg] / libavcodec / gif.c
index c04f8bbc1ddd7e7f06fa76f5461219eb454a8148..a34d710a1074435cde8ba836ba228c273663c76a 100644 (file)
@@ -4,20 +4,20 @@
  * Copyright (c) 2002 Francois Revol
  * Copyright (c) 2006 Baptiste Coudurier
  *
- * 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
  */
 
@@ -87,7 +87,7 @@ static int gif_image_write_image(AVCodecContext *avctx,
                                  const uint8_t *buf, int linesize)
 {
     GIFContext *s = avctx->priv_data;
-    int len, height;
+    int len = 0, height;
     const uint8_t *ptr;
     /* image block */
 
@@ -133,10 +133,10 @@ static av_cold int gif_encode_init(AVCodecContext *avctx)
     avctx->coded_frame = &s->picture;
     s->lzw = av_mallocz(ff_lzw_encode_state_size);
     if (!s->lzw)
-        return AVERROR_NOMEM;
+        return AVERROR(ENOMEM);
     s->buf = av_malloc(avctx->width*avctx->height*2);
     if (!s->buf)
-         return AVERROR_NOMEM;
+         return AVERROR(ENOMEM);
     return 0;
 }
 
@@ -150,7 +150,7 @@ static int gif_encode_frame(AVCodecContext *avctx, unsigned char *outbuf, int bu
     uint8_t *end = outbuf + buf_size;
 
     *p = *pict;
-    p->pict_type = FF_I_TYPE;
+    p->pict_type = AV_PICTURE_TYPE_I;
     p->key_frame = 1;
     gif_image_write_header(avctx, &outbuf_ptr, (uint32_t *)pict->data[1]);
     gif_image_write_image(avctx, &outbuf_ptr, end, pict->data[0], pict->linesize[0]);
@@ -166,7 +166,7 @@ static int gif_encode_close(AVCodecContext *avctx)
     return 0;
 }
 
-AVCodec gif_encoder = {
+AVCodec ff_gif_encoder = {
     "gif",
     AVMEDIA_TYPE_VIDEO,
     CODEC_ID_GIF,