X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fh261dec.c;h=57fe57a1ef112f94ecd52464b63c48b12b59ae76;hb=9afb7061f938831248942050cfdb449e014ed427;hp=dd1931d6daf4c4abe8eb1b31748924ed3bb86532;hpb=324deaa26883efbdac3b82d4b06eee0285826a7f;p=ffmpeg diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c index dd1931d6daf..57fe57a1ef1 100644 --- a/libavcodec/h261dec.c +++ b/libavcodec/h261dec.c @@ -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"), };