Revision f7114249

View differences:

libavcodec/mpeg12.c
1882 1882

  
1883 1883
        start_code= -1;
1884 1884
        buf = ff_find_start_code(buf, s->gb.buffer_end, &start_code);
1885
        mb_y= start_code - SLICE_MIN_START_CODE;
1885
        mb_y= (start_code - SLICE_MIN_START_CODE) << field_pic;
1886
        if (s->picture_structure == PICT_BOTTOM_FIELD)
1887
            mb_y++;
1886 1888
        if(mb_y < 0 || mb_y >= s->end_mb_y)
1887 1889
            return -1;
1888 1890
    }
......
2299 2301
            break;
2300 2302

  
2301 2303
        case PICTURE_START_CODE:
2304
            if (avctx->thread_count > 1 && s->slice_count) {
2305
                int i;
2306

  
2307
                avctx->execute(avctx, slice_decode_thread,
2308
                               s2->thread_context, NULL,
2309
                               s->slice_count, sizeof(void*));
2310
                for (i = 0; i < s->slice_count; i++)
2311
                    s2->error_count += s2->thread_context[i]->error_count;
2312
                s->slice_count = 0;
2313
            }
2302 2314
            if(last_code == 0 || last_code == SLICE_MIN_START_CODE){
2303 2315
            if(mpeg_decode_postinit(avctx) < 0){
2304 2316
                av_log(avctx, AV_LOG_ERROR, "mpeg_decode_postinit() failure\n");

Also available in: Unified diff