Revision b0e7a932 libavcodec/svq3.c

View differences:

libavcodec/svq3.c
932 932
    H264Context *h = &svq3->h;
933 933
    MpegEncContext *s = &h->s;
934 934
    int buf_size = avpkt->size;
935
    int m, mb_type;
935
    int m, mb_type, left;
936 936

  
937 937
    /* special case for last picture */
938 938
    if (buf_size == 0) {
......
1054 1054
        ff_draw_horiz_band(s, 16*s->mb_y, 16);
1055 1055
    }
1056 1056

  
1057
    left = buf_size*8 - get_bits_count(&s->gb);
1058

  
1059
    if (s->mb_y != s->mb_height || s->mb_x != s->mb_width) {
1060
        av_log(avctx, AV_LOG_INFO, "frame num %d incomplete pic x %d y %d left %d\n", avctx->frame_number, s->mb_y, s->mb_x, left);
1061
        //av_hex_dump(stderr, buf+buf_size-8, 8);
1062
    }
1063

  
1064
    if (left < 0) {
1065
        av_log(avctx, AV_LOG_ERROR, "frame num %d left %d\n", avctx->frame_number, left);
1066
        return -1;
1067
    }
1068

  
1057 1069
    MPV_frame_end(s);
1058 1070

  
1059 1071
    if (s->pict_type == AV_PICTURE_TYPE_B || s->low_delay) {

Also available in: Unified diff