]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/eatgv.c
lavc: revert the Makefile part of 330177b
[ffmpeg] / libavcodec / eatgv.c
index 3bc650665cffe66ad9567094be54fb16f39001f3..4faae50a1824a798d8fce142fa9f660f3fdc36ab 100644 (file)
@@ -55,7 +55,7 @@ static av_cold int tgv_decode_init(AVCodecContext *avctx)
 {
     TgvContext *s = avctx->priv_data;
     s->avctx         = avctx;
-    avctx->time_base = (AVRational){1, 15};
+    avctx->framerate = (AVRational){ 15, 1 };
     avctx->pix_fmt   = AV_PIX_FMT_PAL8;
 
     s->last_frame = av_frame_alloc();
@@ -173,7 +173,9 @@ static int tgv_decode_inter(TgvContext *s, AVFrame *frame,
 
     /* allocate codebook buffers as necessary */
     if (num_mvs > s->num_mvs) {
-        s->mv_codebook = av_realloc(s->mv_codebook, num_mvs*2*sizeof(int));
+        int err = av_reallocp(&s->mv_codebook, num_mvs * 2 * sizeof(int));
+        if (err < 0)
+            return err;
         s->num_mvs = num_mvs;
     }
 
@@ -355,5 +357,5 @@ AVCodec ff_eatgv_decoder = {
     .init           = tgv_decode_init,
     .close          = tgv_decode_end,
     .decode         = tgv_decode_frame,
-    .capabilities   = CODEC_CAP_DR1,
+    .capabilities   = AV_CODEC_CAP_DR1,
 };