Ticket #8522: 0001-Remove-DASH-decoder-special-case-for-publish_time-0-.patch

File 0001-Remove-DASH-decoder-special-case-for-publish_time-0-.patch, 1.9 KB (added by onitake, 6 years ago)
  • libavformat/dashdec.c

    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)  
    14241424            av_log(s, AV_LOG_TRACE, "in fragment_duration mode fragment_timescale = %"PRId64", presentation_timeoffset = %"PRId64"\n", pls->fragment_timescale, pls->presentation_timeoffset);
    14251425            if (pls->presentation_timeoffset) {
    14261426                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                 }
    14331427            } else {
    14341428                num = pls->first_seq_no + (((get_current_time_in_sec() - c->availability_start_time) - c->suggested_presentation_delay) * pls->fragment_timescale) / pls->fragment_duration;
    14351429            }