]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/kmvc.c
avcodec: Constify AVCodecs
[ffmpeg] / libavcodec / kmvc.c
index dd1ae05f2dbae7e6be79ff7e194eff9c7e8ac382..5d3dd4ce63790dd3ff950d11aa684cf4ac65e3e6 100644 (file)
@@ -345,13 +345,7 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *got_frame,
     }
 
     /* flip buffers */
-    if (ctx->cur == ctx->frm0) {
-        ctx->cur = ctx->frm1;
-        ctx->prev = ctx->frm0;
-    } else {
-        ctx->cur = ctx->frm0;
-        ctx->prev = ctx->frm1;
-    }
+    FFSWAP(uint8_t *, ctx->cur, ctx->prev);
 
     *got_frame = 1;
 
@@ -410,7 +404,7 @@ static av_cold int decode_init(AVCodecContext * avctx)
     return 0;
 }
 
-AVCodec ff_kmvc_decoder = {
+const AVCodec ff_kmvc_decoder = {
     .name           = "kmvc",
     .long_name      = NULL_IF_CONFIG_SMALL("Karl Morton's video codec"),
     .type           = AVMEDIA_TYPE_VIDEO,