diff options
author | Anton Khirnov <anton@khirnov.net> | 2013-10-27 21:04:20 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-10-29 20:10:41 +0100 |
commit | 4eb49fdde8f84d54a763cfb5d355527b525ee2bf (patch) | |
tree | cb472642861bddd0ce073e31a154bb2fb83701c8 /libavformat/utils.c | |
parent | e166b82dd483754adad89bb0e5c684cb61e4c281 (diff) | |
download | ffmpeg-4eb49fdde8f84d54a763cfb5d355527b525ee2bf.tar.gz |
lavf: remove unreliable timestamp guessing heuristic
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r-- | libavformat/utils.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index 265813693a..3bb837a7b2 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1091,27 +1091,6 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st, pkt->dts += offset; } - if (pc && pc->dts_sync_point >= 0) { - // we have synchronization info from the parser - int64_t den = st->codec->time_base.den * (int64_t) st->time_base.num; - if (den > 0) { - int64_t num = st->codec->time_base.num * (int64_t) st->time_base.den; - if (pkt->dts != AV_NOPTS_VALUE) { - // got DTS from the stream, update reference timestamp - st->reference_dts = pkt->dts - pc->dts_ref_dts_delta * num / den; - } else if (st->reference_dts != AV_NOPTS_VALUE) { - // compute DTS based on reference timestamp - pkt->dts = st->reference_dts + pc->dts_ref_dts_delta * num / den; - } - - if (st->reference_dts != AV_NOPTS_VALUE && pkt->pts == AV_NOPTS_VALUE) - pkt->pts = pkt->dts + pc->pts_dts_delta * num / den; - - if (pc->dts_sync_point > 0) - st->reference_dts = pkt->dts; // new reference - } - } - /* This may be redundant, but it should not hurt. */ if(pkt->dts != AV_NOPTS_VALUE && pkt->pts != AV_NOPTS_VALUE && pkt->pts > pkt->dts) presentation_delayed = 1; @@ -1581,7 +1560,6 @@ void ff_read_frame_flush(AVFormatContext *s) st->last_IP_pts = AV_NOPTS_VALUE; if(st->first_dts == AV_NOPTS_VALUE) st->cur_dts = RELATIVE_TS_BASE; else st->cur_dts = AV_NOPTS_VALUE; /* we set the current DTS to an unspecified origin */ - st->reference_dts = AV_NOPTS_VALUE; st->probe_packets = MAX_PROBE_PACKETS; @@ -2365,7 +2343,6 @@ static void estimate_timings_from_pts(AVFormatContext *ic, int64_t old_offset) st= ic->streams[i]; st->cur_dts= st->first_dts; st->last_IP_pts = AV_NOPTS_VALUE; - st->reference_dts = AV_NOPTS_VALUE; } } @@ -3388,7 +3365,6 @@ AVStream *avformat_new_stream(AVFormatContext *s, const AVCodec *c) st->last_IP_pts = AV_NOPTS_VALUE; for(i=0; i<MAX_REORDER_DELAY+1; i++) st->pts_buffer[i]= AV_NOPTS_VALUE; - st->reference_dts = AV_NOPTS_VALUE; st->sample_aspect_ratio = (AVRational){0,1}; |