[FFmpeg-cvslog] ffmpeg: Do not discard slightly invalid timestamps.

Michael Niedermayer git at videolan.org
Sun Aug 12 01:31:03 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Aug 11 23:38:48 2012 +0200| [c5ea3a009b15a3334ca469885303182e9f218836] | committer: Michael Niedermayer

ffmpeg: Do not discard slightly invalid timestamps.

Fixes Ticket1627

The fate change is due to ffmpeg no longer pushing audio timestamps
aggressively up (which is what caused the AV sync issues in the ticket)
but leaving them as they are.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c5ea3a009b15a3334ca469885303182e9f218836
---

 ffmpeg.c           |    8 ++++----
 tests/ref/lavf/mxf |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 662e84a..411cad1 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2835,8 +2835,8 @@ static int process_input(void)
         }
         } else {
             if ( delta < -1LL*dts_error_threshold*AV_TIME_BASE ||
-                (delta > 1LL*dts_error_threshold*AV_TIME_BASE && ist->st->codec->codec_type != AVMEDIA_TYPE_SUBTITLE) ||
-                    pkt_dts+1<ist->pts){
+                (delta > 1LL*dts_error_threshold*AV_TIME_BASE && ist->st->codec->codec_type != AVMEDIA_TYPE_SUBTITLE)
+               ) {
                 av_log(NULL, AV_LOG_WARNING, "DTS %"PRId64", next:%"PRId64" st:%d invalid dropping\n", pkt.dts, ist->next_dts, pkt.stream_index);
                 pkt.dts = AV_NOPTS_VALUE;
             }
@@ -2844,8 +2844,8 @@ static int process_input(void)
                 int64_t pkt_pts = av_rescale_q(pkt.pts, ist->st->time_base, AV_TIME_BASE_Q);
                 delta   = pkt_pts - ist->next_dts;
                 if ( delta < -1LL*dts_error_threshold*AV_TIME_BASE ||
-                    (delta > 1LL*dts_error_threshold*AV_TIME_BASE && ist->st->codec->codec_type != AVMEDIA_TYPE_SUBTITLE) ||
-                    pkt_pts+1<ist->pts) {
+                    (delta > 1LL*dts_error_threshold*AV_TIME_BASE && ist->st->codec->codec_type != AVMEDIA_TYPE_SUBTITLE)
+                   ) {
                     av_log(NULL, AV_LOG_WARNING, "PTS %"PRId64", next:%"PRId64" invalid dropping st:%d\n", pkt.pts, ist->next_dts, pkt.stream_index);
                     pkt.pts = AV_NOPTS_VALUE;
                 }
diff --git a/tests/ref/lavf/mxf b/tests/ref/lavf/mxf
index 7e48d50..2253329 100644
--- a/tests/ref/lavf/mxf
+++ b/tests/ref/lavf/mxf
@@ -3,7 +3,7 @@
 ./tests/data/lavf/lavf.mxf CRC=0x4ace0849
 88ab06201db1953329bfb4aa04a4fe05 *./tests/data/lavf/lavf.mxf
 553529 ./tests/data/lavf/lavf.mxf
-./tests/data/lavf/lavf.mxf CRC=0x86fddf92
+./tests/data/lavf/lavf.mxf CRC=0xdb9bdf92
 52c5b74ecfdc48bd77d79a6bbe62d2de *./tests/data/lavf/lavf.mxf
 525881 ./tests/data/lavf/lavf.mxf
 ./tests/data/lavf/lavf.mxf CRC=0x4ace0849



More information about the ffmpeg-cvslog mailing list