Revision 66e9e302 libavformat/mpeg.c

View differences:

libavformat/mpeg.c
120 120

  
121 121
static int64_t get_pts(ByteIOContext *pb, int c)
122 122
{
123
    int64_t pts;
124
    int val;
125

  
126
    if (c < 0)
127
        c = get_byte(pb);
128
    pts = (int64_t)(c & 0x0e) << 29;
129
    val = get_be16(pb);
130
    pts |= (int64_t)(val >> 1) << 15;
131
    val = get_be16(pb);
132
    pts |= (int64_t)(val >> 1);
133
    return pts;
123
    uint8_t buf[5];
124

  
125
    buf[0] = c<0 ? get_byte(pb) : c;
126
    get_buffer(pb, buf+1, 4);
127

  
128
    return ff_parse_pes_pts(buf);
134 129
}
135 130

  
136 131
static int find_next_start_code(ByteIOContext *pb, int *size_ptr,

Also available in: Unified diff