]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/escape124.c
x86: float_dsp: fix ff_vector_fmac_scalar_avx() on Win64
[ffmpeg] / libavcodec / escape124.c
index 9d216a4c9555e26c2026749903ac42a14beb8cb1..0c3339b1585d4a1e769f0f11204ad2d526f0ede5 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "avcodec.h"
 
-#define ALT_BITSTREAM_READER_LE
+#define BITSTREAM_READER_LE
 #include "get_bits.h"
 
 typedef union MacroBlock {
@@ -49,7 +49,7 @@ typedef struct Escape124Context {
 } Escape124Context;
 
 static int can_safely_read(GetBitContext* gb, int bits) {
-    return get_bits_count(gb) + bits <= gb->size_in_bits;
+    return get_bits_left(gb) >= bits;
 }
 
 /**
@@ -364,15 +364,13 @@ static int escape124_decode_frame(AVCodecContext *avctx,
 
 
 AVCodec ff_escape124_decoder = {
-    "escape124",
-    AVMEDIA_TYPE_VIDEO,
-    CODEC_ID_ESCAPE124,
-    sizeof(Escape124Context),
-    escape124_decode_init,
-    NULL,
-    escape124_decode_close,
-    escape124_decode_frame,
-    CODEC_CAP_DR1,
-    .long_name = NULL_IF_CONFIG_SMALL("Escape 124"),
+    .name           = "escape124",
+    .type           = AVMEDIA_TYPE_VIDEO,
+    .id             = AV_CODEC_ID_ESCAPE124,
+    .priv_data_size = sizeof(Escape124Context),
+    .init           = escape124_decode_init,
+    .close          = escape124_decode_close,
+    .decode         = escape124_decode_frame,
+    .capabilities   = CODEC_CAP_DR1,
+    .long_name      = NULL_IF_CONFIG_SMALL("Escape 124"),
 };
-