Revision 7be806f3

View differences:

libavformat/mpeg.c
47 47
    int lpcm_align;
48 48
    uint8_t *fifo_iframe_ptr;
49 49
    int align_iframe;
50
    int64_t vobu_start_pts;
50 51
} StreamInfo;
51 52

  
52 53
typedef struct {
......
1176 1177
    fifo_realloc(&stream->fifo, fifo_size(&stream->fifo, NULL) + size + 1);
1177 1178

  
1178 1179
    if (s->is_dvd){
1179
        if (is_iframe) {
1180
        if (is_iframe && (s->packet_number == 0 || (pts - stream->vobu_start_pts >= 36000))) { // min VOBU length 0.4 seconds (mpucoder)
1180 1181
            stream->fifo_iframe_ptr = stream->fifo.wptr;
1181 1182
            stream->align_iframe = 1;
1183
            stream->vobu_start_pts = pts;
1182 1184
        } else {
1183 1185
            stream->align_iframe = 0;
1184 1186
        }

Also available in: Unified diff