Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-02-22 17:22:31 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-02-22 17:31:23 +0400
commitd4dfa97ae3ad239e7b771d0baf7716947c397dfd (patch)
treea683984e887ee1f1600963bd5e59324fbd48d1fb /libavformat
parentf288e1b67cbab43c0591483ea323ce1e83df74cb (diff)
avformat/utils: reset pts_buffer in estimate_timings_from_pts()
This fixes the first few dts after find_stream_info Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index cb048f958a..357d95b9a1 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -2441,9 +2441,13 @@ static void estimate_timings_from_pts(AVFormatContext *ic, int64_t old_offset)
avio_seek(ic->pb, old_offset, SEEK_SET);
for (i = 0; i < ic->nb_streams; i++) {
+ int j;
+
st = ic->streams[i];
st->cur_dts = st->first_dts;
st->last_IP_pts = AV_NOPTS_VALUE;
+ for (j = 0; j < MAX_REORDER_DELAY + 1; j++)
+ st->pts_buffer[j] = AV_NOPTS_VALUE;
}
}