Browse Source

dont predict missing timestamps if we lack the required information to do so

Originally committed as revision 3898 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Michael Niedermayer 21 years ago
parent
commit
a603bf8d68
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      ffmpeg.c
  2. +1
    -1
      libavformat/utils.c

+ 1
- 1
ffmpeg.c View File

@@ -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 } else if (pkt->dts != AV_NOPTS_VALUE) { //FIXME seems redundant, as libavformat does this too
ist->next_pts = ist->pts = pkt->dts; ist->next_pts = ist->pts = pkt->dts;
} else { } else {
assert(ist->pts == ist->next_pts);
// assert(ist->pts == ist->next_pts);
} }
if (pkt == NULL) { if (pkt == NULL) {


+ 1
- 1
libavformat/utils.c View File

@@ -745,7 +745,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
st->last_IP_pts= pkt->pts; st->last_IP_pts= pkt->pts;
/* cannot compute PTS if not present (we can compute it only /* cannot compute PTS if not present (we can compute it only
by knowing the futur */ 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){ if(pkt->pts != AV_NOPTS_VALUE && pkt->duration){
int64_t old_diff= ABS(st->cur_dts - pkt->duration - pkt->pts); int64_t old_diff= ABS(st->cur_dts - pkt->duration - pkt->pts);
int64_t new_diff= ABS(st->cur_dts - pkt->pts); int64_t new_diff= ABS(st->cur_dts - pkt->pts);


Loading…
Cancel
Save