]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/interplayvideo.c
Merge remote-tracking branch 'qatar/master'
[ffmpeg] / libavcodec / interplayvideo.c
index 3bbb464affd6491fe0d60749cce239cbd96f9e61..c8aa8bf65b78a02f12c78852a8de2a31edf10221 100644 (file)
@@ -2,20 +2,20 @@
  * Interplay MVE Video Decoder
  * Copyright (C) 2003 the ffmpeg project
  *
- * This file is part of Libav.
+ * This file is part of FFmpeg.
  *
- * Libav is free software; you can redistribute it and/or
+ * FFmpeg 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.
  *
- * Libav is distributed in the hope that it will be useful,
+ * FFmpeg 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 Libav; if not, write to the Free Software
+ * License along with FFmpeg; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
@@ -1022,6 +1022,9 @@ static av_cold int ipvideo_decode_init(AVCodecContext *avctx)
     /* decoding map contains 4 bits of information per 8x8 block */
     s->decoding_map_size = avctx->width * avctx->height / (8 * 8 * 2);
 
+    avcodec_get_frame_defaults(&s->second_last_frame);
+    avcodec_get_frame_defaults(&s->last_frame);
+    avcodec_get_frame_defaults(&s->current_frame);
     s->current_frame.data[0] = s->last_frame.data[0] =
     s->second_last_frame.data[0] = NULL;
 
@@ -1089,14 +1092,13 @@ static av_cold int ipvideo_decode_end(AVCodecContext *avctx)
 }
 
 AVCodec ff_interplay_video_decoder = {
-    "interplayvideo",
-    AVMEDIA_TYPE_VIDEO,
-    CODEC_ID_INTERPLAY_VIDEO,
-    sizeof(IpvideoContext),
-    ipvideo_decode_init,
-    NULL,
-    ipvideo_decode_end,
-    ipvideo_decode_frame,
-    CODEC_CAP_DR1,
+    .name           = "interplayvideo",
+    .type           = AVMEDIA_TYPE_VIDEO,
+    .id             = CODEC_ID_INTERPLAY_VIDEO,
+    .priv_data_size = sizeof(IpvideoContext),
+    .init           = ipvideo_decode_init,
+    .close          = ipvideo_decode_end,
+    .decode         = ipvideo_decode_frame,
+    .capabilities   = CODEC_CAP_DR1,
     .long_name = NULL_IF_CONFIG_SMALL("Interplay MVE video"),
 };