From 8e9d2a3e6b5a38fb987a0b095ac09cfaa4f745c5 Mon Sep 17 00:00:00 2001
From: Gregor Riepl <onitake@gmail.com>
Date: Wed, 12 Feb 2020 19:57:32 +0100
Subject: [PATCH] Remove DASH decoder special case for publish_time > 0 &&
availability_start_time == 0 The calculation produces incorrect segment
numbers and doesn't seem to cover anything described in the DASH
specification.
---
libavformat/dashdec.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index c5a5ff607b..503c7de935 100644
|
a
|
b
|
static int64_t calc_cur_seg_no(AVFormatContext *s, struct representation *pls)
|
| 1424 | 1424 | av_log(s, AV_LOG_TRACE, "in fragment_duration mode fragment_timescale = %"PRId64", presentation_timeoffset = %"PRId64"\n", pls->fragment_timescale, pls->presentation_timeoffset); |
| 1425 | 1425 | if (pls->presentation_timeoffset) { |
| 1426 | 1426 | num = pls->first_seq_no + (((get_current_time_in_sec() - c->availability_start_time) * pls->fragment_timescale)-pls->presentation_timeoffset) / pls->fragment_duration - c->min_buffer_time; |
| 1427 | | } else if (c->publish_time > 0 && !c->availability_start_time) { |
| 1428 | | if (c->min_buffer_time) { |
| 1429 | | num = pls->first_seq_no + (((c->publish_time + pls->fragment_duration) - c->suggested_presentation_delay) * pls->fragment_timescale) / pls->fragment_duration - c->min_buffer_time; |
| 1430 | | } else { |
| 1431 | | 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; |
| 1432 | | } |
| 1433 | 1427 | } else { |
| 1434 | 1428 | num = pls->first_seq_no + (((get_current_time_in_sec() - c->availability_start_time) - c->suggested_presentation_delay) * pls->fragment_timescale) / pls->fragment_duration; |
| 1435 | 1429 | } |