[FFmpeg-cvslog] avformat/dashdec: Fix calc_cur_seg_no if availability_start_time not

Jacek Jendrzej git at videolan.org
Wed Aug 29 11:37:40 EEST 2018


ffmpeg | branch: master | Jacek Jendrzej <overx300 at gmail.com> | Wed Aug 29 15:20:00 2018 +0800| [3cff2311ab9d6a0000120ef61f811aa139c038a8] | committer: Steven Liu

avformat/dashdec: Fix calc_cur_seg_no if availability_start_time not

Reviewed-by: Steven Liu <lq at chinaffmpeg.org>

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

 libavformat/dashdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index c6dddeb98f..85fbe6aacc 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -1296,7 +1296,7 @@ static int64_t calc_cur_seg_no(AVFormatContext *s, struct representation *pls)
             if (pls->presentation_timeoffset) {
                 num = pls->presentation_timeoffset * pls->fragment_timescale / pls->fragment_duration;
             } else if (c->publish_time > 0 && !c->availability_start_time) {
-                num = pls->first_seq_no + (((c->publish_time - c->availability_start_time) - c->suggested_presentation_delay) * pls->fragment_timescale) / pls->fragment_duration;
+                num = pls->first_seq_no + (((c->publish_time - c->time_shift_buffer_depth + pls->fragment_duration) - c->suggested_presentation_delay) * pls->fragment_timescale) / pls->fragment_duration;
             } else {
                 num = pls->first_seq_no + (((get_current_time_in_sec() - c->availability_start_time) - c->suggested_presentation_delay) * pls->fragment_timescale) / pls->fragment_duration;
             }



More information about the ffmpeg-cvslog mailing list