aboutsummaryrefslogtreecommitdiff
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer2011-11-03 14:31:01 +0100
committerMichael Niedermayer2011-11-03 14:47:42 +0100
commit1ed9eb5a595a46ae6b523bc34a3ed4667a44c6f1 (patch)
tree29bb29fb635489473439a6769660cd39d69976ac /libavformat/utils.c
parentd6af8e68c41133ee5b0eb9e985686c46fe0aa57e (diff)
lavf: Do not set cur_dts to undetermined before first_dts has been calculated as this would upset the start_time and first_dts calculation.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 2cf42d3c43..333946c172 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1415,7 +1415,8 @@ void ff_read_frame_flush(AVFormatContext *s)
av_free_packet(&st->cur_pkt);
}
st->last_IP_pts = AV_NOPTS_VALUE;
- st->cur_dts = AV_NOPTS_VALUE; /* we set the current DTS to an unspecified origin */
+ if(st->first_dts == AV_NOPTS_VALUE) st->cur_dts = 0;
+ else st->cur_dts = AV_NOPTS_VALUE; /* we set the current DTS to an unspecified origin */
st->reference_dts = AV_NOPTS_VALUE;
/* fail safe */
st->cur_ptr = NULL;