Revision 1206f1d6

View differences:

libavcodec/mpeg12.c
1579 1579
    dprintf(s->avctx, "progressive_frame=%d\n", s->progressive_frame);
1580 1580
}
1581 1581

  
1582
static void mpeg_decode_extension(AVCodecContext *avctx,
1583
                                  const uint8_t *buf, int buf_size)
1584
{
1585
    Mpeg1Context *s1 = avctx->priv_data;
1586
    MpegEncContext *s = &s1->mpeg_enc_ctx;
1587
    int ext_type;
1588

  
1589
    init_get_bits(&s->gb, buf, buf_size*8);
1590

  
1591
    ext_type = get_bits(&s->gb, 4);
1592
    switch(ext_type) {
1593
    case 0x1:
1594
        mpeg_decode_sequence_extension(s1);
1595
        break;
1596
    case 0x2:
1597
        mpeg_decode_sequence_display_extension(s1);
1598
        break;
1599
    case 0x3:
1600
        mpeg_decode_quant_matrix_extension(s);
1601
        break;
1602
    case 0x7:
1603
        mpeg_decode_picture_display_extension(s1);
1604
        break;
1605
    case 0x8:
1606
        mpeg_decode_picture_coding_extension(s1);
1607
        break;
1608
    }
1609
}
1610

  
1611 1582
static void exchange_uv(MpegEncContext *s){
1612 1583
    DCTELEM (*tmp)[64];
1613 1584

  
......
2339 2310
                s2->pict_type=0;
2340 2311
            break;
2341 2312
        case EXT_START_CODE:
2342
            mpeg_decode_extension(avctx,
2343
                                    buf_ptr, input_size);
2313
            init_get_bits(&s2->gb, buf_ptr, input_size*8);
2314

  
2315
            switch(get_bits(&s2->gb, 4)) {
2316
            case 0x1:
2317
                mpeg_decode_sequence_extension(s);
2318
                break;
2319
            case 0x2:
2320
                mpeg_decode_sequence_display_extension(s);
2321
                break;
2322
            case 0x3:
2323
                mpeg_decode_quant_matrix_extension(s2);
2324
                break;
2325
            case 0x7:
2326
                mpeg_decode_picture_display_extension(s);
2327
                break;
2328
            case 0x8:
2329
                mpeg_decode_picture_coding_extension(s);
2330
                break;
2331
            }
2344 2332
            break;
2345 2333
        case USER_START_CODE:
2346 2334
            mpeg_decode_user_data(avctx,

Also available in: Unified diff