---
libavcodec/mxpegdec.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/libavcodec/mxpegdec.c b/libavcodec/mxpegdec.c
index a8ef6d0..6510077 100644
--- a/libavcodec/mxpegdec.c
+++ b/libavcodec/mxpegdec.c
@@ -25,6 +25,7 @@
* MxPEG decoder
*/
+#include "bitstream.h"
#include "internal.h"
#include "mjpeg.h"
#include "mjpegdec.h"
@@ -82,7 +83,7 @@ static int mxpeg_decode_app(MXpegDecodeContext *s,
if (buf_size < 2)
return 0;
len = AV_RB16(buf_ptr);
- skip_bits(&s->jpg.gb, 8*FFMIN(len,buf_size));
+ bitstream_skip(&s->jpg.bc, 8 * FFMIN(len,buf_size));
return 0;
}
@@ -149,7 +150,7 @@ static int mxpeg_decode_com(MXpegDecodeContext *s,
if (len > 14 && len <= buf_size && !strncmp(buf_ptr + 2, "MXM", 3)) {
ret = mxpeg_decode_mxm(s, buf_ptr + 2, len - 2);
}
- skip_bits(&s->jpg.gb, 8*FFMIN(len,buf_size));
+ bitstream_skip(&s->jpg.bc, 8*FFMIN(len,buf_size));
return ret;
}
@@ -203,7 +204,7 @@ static int mxpeg_decode_frame(AVCodecContext *avctx,
if (start_code < 0)
goto the_end;
{
- init_get_bits(&jpg->gb, unescaped_buf_ptr, unescaped_buf_size*8);
+ bitstream_init8(&jpg->bc, unescaped_buf_ptr, unescaped_buf_size);
if (start_code >= APP0 && start_code <= APP15) {
mxpeg_decode_app(s, unescaped_buf_ptr, unescaped_buf_size);
@@ -310,7 +311,7 @@ static int mxpeg_decode_frame(AVCodecContext *avctx,
break;
}
- buf_ptr += (get_bits_count(&jpg->gb)+7) >> 3;
+ buf_ptr += (bitstream_tell(&jpg->bc) + 7) >> 3;
}
}
--
2.1.4
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel