]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/h261dec.c
mov_chan: Pass a separate AVIOContext for reading
[ffmpeg] / libavcodec / h261dec.c
index dd1931d6daf4c4abe8eb1b31748924ed3bb86532..57fe57a1ef112f94ecd52464b63c48b12b59ae76 100644 (file)
@@ -265,7 +265,7 @@ static int h261_decode_mb(H261Context *h){
     while( h->mba_diff == MBA_STUFFING ); // stuffing
 
     if ( h->mba_diff < 0 ){
-        if ( get_bits_count(&s->gb) + 7 >= s->gb.size_in_bits )
+        if (get_bits_left(&s->gb) <= 7)
             return SLICE_END;
 
         av_log(s->avctx, AV_LOG_ERROR, "illegal mba at %d %d\n", s->mb_x, s->mb_y);
@@ -645,12 +645,11 @@ static av_cold int h261_decode_end(AVCodecContext *avctx)
 AVCodec ff_h261_decoder = {
     .name           = "h261",
     .type           = AVMEDIA_TYPE_VIDEO,
-    .id             = CODEC_ID_H261,
+    .id             = AV_CODEC_ID_H261,
     .priv_data_size = sizeof(H261Context),
     .init           = h261_decode_init,
     .close          = h261_decode_end,
     .decode         = h261_decode_frame,
     .capabilities   = CODEC_CAP_DR1,
-    .max_lowres = 3,
-    .long_name = NULL_IF_CONFIG_SMALL("H.261"),
+    .long_name      = NULL_IF_CONFIG_SMALL("H.261"),
 };