Revision b90ba24b

View differences:

libavformat/mpeg.c
1502 1502
        c = get_byte(&s->pb);
1503 1503
        len -= 2;
1504 1504
    }
1505
    if ((c & 0xf0) == 0x20) {
1505
    if ((c & 0xe0) == 0x20) {
1506 1506
        dts = pts = get_pts(&s->pb, c);
1507 1507
        len -= 4;
1508
    } else if ((c & 0xf0) == 0x30) {
1509
        pts = get_pts(&s->pb, c);
1510
        dts = get_pts(&s->pb, -1);
1511
        len -= 9;
1508
        if (c & 0x10){
1509
            dts = get_pts(&s->pb, -1);
1510
            len -= 5;
1511
        }
1512 1512
    } else if ((c & 0xc0) == 0x80) {
1513 1513
        /* mpeg 2 PES */
1514 1514
#if 0 /* some streams have this field set for no apparent reason */
......
1522 1522
        len -= 2;
1523 1523
        if (header_len > len)
1524 1524
            goto error_redo;
1525
        if ((flags & 0xc0) == 0x80) {
1525
        if (flags & 0x80) {
1526 1526
            dts = pts = get_pts(&s->pb, -1);
1527 1527
            header_len -= 5;
1528 1528
            len -= 5;
1529
        } if ((flags & 0xc0) == 0xc0) {
1530
            pts = get_pts(&s->pb, -1);
1531
            dts = get_pts(&s->pb, -1);
1532
            header_len -= 10;
1533
            len -= 10;
1529
            if (flags & 0x40) {
1530
                dts = get_pts(&s->pb, -1);
1531
                header_len -= 5;
1532
                len -= 5;
1533
            }
1534 1534
        }
1535 1535
        len -= header_len;
1536 1536
        while (header_len > 0) {

Also available in: Unified diff