]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/tmv.c
lavc: remove disabled FF_API_ALLOC_CONTEXT cruft.
[ffmpeg] / libavcodec / tmv.c
index 3c2ae0195287b297c7bd3fbe2608fcdaa9b8a284..be809b367578c184e307ca13d36517db6d282e27 100644 (file)
  */
 
 /**
- * 8088flex TMV video decoder
  * @file
+ * 8088flex TMV video decoder
  * @author Daniel Verkamp
- * @sa http://www.oldskool.org/pc/8088_Corruption
+ * @see http://www.oldskool.org/pc/8088_Corruption
  */
 
 #include "avcodec.h"
@@ -59,7 +59,7 @@ static int tmv_decode_frame(AVCodecContext *avctx, void *data,
         return -1;
     }
 
-    tmv->pic.pict_type = FF_I_TYPE;
+    tmv->pic.pict_type = AV_PICTURE_TYPE_I;
     tmv->pic.key_frame = 1;
     dst                = tmv->pic.data[0];
 
@@ -82,6 +82,12 @@ static int tmv_decode_frame(AVCodecContext *avctx, void *data,
     return avpkt->size;
 }
 
+static av_cold int tmv_decode_init(AVCodecContext *avctx)
+{
+    avctx->pix_fmt = PIX_FMT_PAL8;
+    return 0;
+}
+
 static av_cold int tmv_decode_close(AVCodecContext *avctx)
 {
     TMVContext *tmv = avctx->priv_data;
@@ -97,6 +103,7 @@ AVCodec ff_tmv_decoder = {
     .type           = AVMEDIA_TYPE_VIDEO,
     .id             = CODEC_ID_TMV,
     .priv_data_size = sizeof(TMVContext),
+    .init           = tmv_decode_init,
     .close          = tmv_decode_close,
     .decode         = tmv_decode_frame,
     .capabilities   = CODEC_CAP_DR1,