]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/escape124.c
avcodec/mjpegdec: fix SOF check in EOI
[ffmpeg] / libavcodec / escape124.c
index 14f939633295dfeed5c1e492eabfadbc2a066879..3b514e7eb054c09e13dd2f09175f32b99fbbd0fd 100644 (file)
@@ -222,8 +222,8 @@ static int escape124_decode_frame(AVCodecContext *avctx,
     // This call also guards the potential depth reads for the
     // codebook unpacking.
     // Check if the amount we will read minimally is available on input.
-    // The 64 represent the immedeatly next 2 frame_* elements read, the 23/4320
-    // represent a lower bound of the space needed for skiped superblocks. Non
+    // The 64 represent the immediately next 2 frame_* elements read, the 23/4320
+    // represent a lower bound of the space needed for skipped superblocks. Non
     // skipped SBs need more space.
     if (get_bits_left(&gb) < 64 + s->num_superblocks * 23LL / 4320)
         return -1;
@@ -252,7 +252,7 @@ static int escape124_decode_frame(AVCodecContext *avctx,
             if (i == 2) {
                 // This codebook can be cut off at places other than
                 // powers of 2, leaving some of the entries undefined.
-                cb_size = get_bits_long(&gb, 20);
+                cb_size = get_bits(&gb, 20);
                 if (!cb_size) {
                     av_log(avctx, AV_LOG_ERROR, "Invalid codebook size 0.\n");
                     return AVERROR_INVALIDDATA;
@@ -376,7 +376,7 @@ static int escape124_decode_frame(AVCodecContext *avctx,
 }
 
 
-AVCodec ff_escape124_decoder = {
+const AVCodec ff_escape124_decoder = {
     .name           = "escape124",
     .long_name      = NULL_IF_CONFIG_SMALL("Escape 124"),
     .type           = AVMEDIA_TYPE_VIDEO,