VPAAMP-245: Negative Latency value logged while HLS linear playback#1442
Open
psiva01 wants to merge 6 commits into
Open
VPAAMP-245: Negative Latency value logged while HLS linear playback#1442psiva01 wants to merge 6 commits into
psiva01 wants to merge 6 commits into
Conversation
w/o TSB Reason for change: EndPos is set to -1 for TSB-less playback before latency calculation. This caused latency to be negative, since HLS latency is calculated as EndPos - CurrPos. So, moved this tsbless block after latency calculation. Also, fixed start and end values in aamp pos logging. Signed-off-by: psiva01 <sivasubramanian.patchaiperumal@ltts.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes negative live-latency reporting during TSB-less linear HLS playback by ensuring end is not overwritten to -1 until after latency is computed, and improves progress logging to correctly print sentinel -1 start/end values.
Changes:
- Move the “TSB-less linear”
start/end = -1override to occur after live latency calculation. - Adjust
aamp poslogging to avoid printing0whenstart/endare-1(sentinel), while keeping normal ms→s formatting for valid values.
Comments suppressed due to low confidence (1)
priv_aamp.cpp:2819
- New code introduces C-style casts when converting ms to seconds (e.g.,
(long)(val / 1000)and(long)(reportFormattedCurrPos / 1000)). Preferstatic_cast<long>(...)for safer, more explicit C++ casting in this file.
auto format_pos = [](double val) -> long {
return (val == -1.0) ? -1 : (long)(val / 1000);
};
AAMPLOG_MIL("aamp pos: [%ld..%ld..%ld..%lld..%.2f..%.2f..%.2f..%s..%" BITSPERSECOND_FORMAT "..%" BITSPERSECOND_FORMAT "..%.2f]",
format_pos(start),
(long)(reportFormattedCurrPos / 1000),
format_pos(end),
…camelCase consistency Agent-Logs-Url: https://github.com/rdkcentral/aamp/sessions/58db369a-2b08-48fe-a19c-a00c2fc4ec61 Co-authored-by: psiva01 <214551386+psiva01@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…egative Agent-Logs-Url: https://github.com/rdkcentral/aamp/sessions/447d113b-da77-41be-a441-b021ef3f8bb8 Co-authored-by: psiva01 <214551386+psiva01@users.noreply.github.com>
Signed-off-by: psiva01 <sivasubramanian.patchaiperumal@ltts.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
w/o TSB
Reason for change: EndPos is set to -1 for TSB-less playback before latency calculation. This caused latency to be negative, since HLS latency is calculated as EndPos - CurrPos. So, moved this tsbless block after latency calculation. Also, fixed start and end values in aamp pos logging.