Revert "lavf: count skipped samples for initial timestamps."
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 24 Jul 2012 12:55:30 +0000 (14:55 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 24 Jul 2012 15:10:38 +0000 (17:10 +0200)
This reverts commit 885fc058655efee94203314984ce99b301fdebb1.
This commit caused timestamps in case of generic seeking to become
inconsistent.

libavformat/utils.c

index eef77d0..5bc79f4 100644 (file)
@@ -942,10 +942,6 @@ static void update_initial_durations(AVFormatContext *s, AVStream *st,
     AVPacketList *pktl= s->parse_queue ? s->parse_queue : s->packet_buffer;
     int64_t cur_dts= RELATIVE_TS_BASE;
 
-    if (st->skip_samples && st->codec->sample_rate && st->time_base.num)
-        cur_dts -= av_rescale_q(st->skip_samples,
-                                (AVRational){ 1, st->codec->sample_rate },
-                                st->time_base);
     if(st->first_dts != AV_NOPTS_VALUE){
         cur_dts= st->first_dts;
         for(; pktl; pktl= get_next_pkt(s, st, pktl)){