dcbill <[EMAIL PROTECTED]> added the comment:

Ramiro Polla wrote:
> Ramiro Polla <[EMAIL PROTECTED]> added the comment:
>
> r9982 only affects tcp.c
> You don't use any kind of tcp in your IO, so this patch should not affect 
> anything.
> Please re-run your tests to search for the buggy revision again.
> Always make distclean before new builds.
>   

Sorry, I re-ran tests doing 'make distclean' instead of 'make clean',
appears to be patch r9984 that caused the problem, not r9982.

Do you see anything that would throw off time just on 64-bit machines?

Author: michael
Date: Wed Aug  8 20:54:33 2007
New Revision: 9984

Log:
always handle negative timestamp differences as timestamp discontinuity

Modified:
   trunk/ffmpeg.c

Modified: trunk/ffmpeg.c
==============================================================================
--- trunk/ffmpeg.c      (original)
+++ trunk/ffmpeg.c      Wed Aug  8 20:54:33 2007
@@ -1922,8 +1922,9 @@ static int av_encode(AVFormatContext **o

 //        fprintf(stderr, "next:%"PRId64" dts:%"PRId64" off:%"PRId64" %d\n", 
ist->next_pts, pkt.dts, input_files_ts_offset[ist->file_index], 
ist->st->codec->codec_type);
         if (pkt.dts != AV_NOPTS_VALUE && ist->next_pts != AV_NOPTS_VALUE) {
-            int64_t delta= av_rescale_q(pkt.dts, ist->st->time_base, 
AV_TIME_BASE_Q) - ist->next_pts;
-            if(FFABS(delta) > 1LL*dts_delta_threshold*AV_TIME_BASE && 
!copy_ts){
+            int64_t pkt_dts= av_rescale_q(pkt.dts, ist->st->time_base, 
AV_TIME_BASE_Q);
+            int64_t delta= pkt_dts - ist->next_pts;
+            if((FFABS(delta) > 1LL*dts_delta_threshold*AV_TIME_BASE || 
pkt_dts+1<ist->pts)&& !copy_ts){
                 input_files_ts_offset[ist->file_index]-= delta;
                 if (verbose > 2)
                     fprintf(stderr, "timestamp discontinuity %"PRId64", new 
offset= %"PRId64"\n", delta, input_files_ts_offset[ist->file_index]);

----------
title: Patch 9984 (was Time sync lost,, esp FLV on 64-bit AMD since patch 9982) 
-> Time sync lost,, esp FLV on 64-bit AMD since patch 9982

______________________________________________________
FFmpeg issue tracker <[EMAIL PROTECTED]>
<https://roundup.mplayerhq.hu/roundup/ffmpeg/issue190>
______________________________________________________

Reply via email to