Revision b1b818fc

View differences:

ffmpeg.c
1062 1062
        goto handle_eof;
1063 1063
    }
1064 1064

  
1065
    if(pkt->dts != AV_NOPTS_VALUE)
1066
        ist->next_pts = ist->pts = av_rescale_q(pkt->dts, ist->st->time_base, AV_TIME_BASE_Q);
1067

  
1065 1068
    len = pkt->size;
1066 1069
    ptr = pkt->data;
1067 1070
    while (len > 0) {
1068 1071
    handle_eof:
1069
        if(!pkt || ptr != pkt->data || pkt->dts == AV_NOPTS_VALUE){
1070
            ist->pts= ist->next_pts; // needed for last packet if vsync=0 and for multi pkt
1071
        } else if (pkt->dts != AV_NOPTS_VALUE) { //FIXME seems redundant, as libavformat does this too
1072
            ist->next_pts = ist->pts = av_rescale_q(pkt->dts, ist->st->time_base, AV_TIME_BASE_Q);
1073
        } else {
1074
    //        assert(ist->pts == ist->next_pts);
1075
        }
1072
        ist->pts= ist->next_pts;
1076 1073

  
1077 1074
        /* decode the packet if needed */
1078 1075
        data_buf = NULL; /* fail safe */

Also available in: Unified diff