diff --git a/ffmpeg.c b/ffmpeg.c index dc61d6a2556219264651d14c39d17ae42f3bb64a..d92ac50714d724b8c25f8fb216620555135a40f6 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -1115,7 +1115,7 @@ static int output_packet(AVInputStream *ist, int ist_index, } else if (pkt->dts != AV_NOPTS_VALUE) { //FIXME seems redundant, as libavformat does this too ist->next_pts = ist->pts = pkt->dts; } else { - assert(ist->pts == ist->next_pts); +// assert(ist->pts == ist->next_pts); } if (pkt == NULL) { diff --git a/libavformat/utils.c b/libavformat/utils.c index 92f412105cc1c98e20e7420c92c02533efe7c990..3f74ed529b5479b79d53fedf114872ebd28baadc 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -745,7 +745,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, st->last_IP_pts= pkt->pts; /* cannot compute PTS if not present (we can compute it only by knowing the futur */ - } else { + } else if(pkt->pts != AV_NOPTS_VALUE || pkt->dts != AV_NOPTS_VALUE || pkt->duration){ if(pkt->pts != AV_NOPTS_VALUE && pkt->duration){ int64_t old_diff= ABS(st->cur_dts - pkt->duration - pkt->pts); int64_t new_diff= ABS(st->cur_dts - pkt->pts);