Conversation
Code ReviewCritical Potential integer overflow (AdaptiveStream.cpp:1143) Potential underflow in getMaxTimeMs (AdaptiveStream.cpp:1145) Must Fix Uninitialized isError parameter (Session.cpp:1094) Unused variable ret (Session.cpp:916) Medium Missing m_endPts validation (AdaptiveStream.cpp:1143) Low Inconsistent error logging levels (FragmentedSampleReader.cpp:314) |
6acdd37 to
0e62612
Compare
|
@claude please review |
|
Claude finished @CastagnaIT's task in 3m 15s —— View job Code ReviewI've reviewed the PR changes. Overall, the implementation successfully addresses the seek-to-end issues by improving error handling and fallback logic. The removal of Critical Issues1. Potential Integer Overflow in
|
0e62612 to
a970550
Compare
same pattern is used on many other places thats quite safe
addressed
addressed
any PTS checks can be implemented when creating segments and not in each place where they are used
intentional, PosTime allow a possible seek fallback |
a970550 to
41a1cee
Compare
-7 is true in boolean type, should be returned false when fails
41a1cee to
7e8fc3f
Compare
|
@kodiai i update PR code please review |
kodiai responseReviewed the updated code. The previously reported issues have been properly addressed: Confirmed fixes: (1) Underflow protection (AdaptiveStream.cpp:1145-1150) - Now properly checks if (2) isError initialization (Session.cpp:1116) - The (3) TimeSeek EOS handling (FragmentedSampleReader.cpp:319) - Now returns Code looks good. All critical issues from the previous review have been resolved. |
|
@kodiai review last commit added |
kodiai responseReviewed commit Issue found: (1) Inconsistent segment duration assignment (DASHTree.cpp:1832-1840) The code calculates a partial // Line 1835-1836: Calculate partial duration
if (remainingDur < duration && !m_isLive)
duration = remainingDur;
// Line 1838-1840: BUT uses segDuration instead of duration
CSegment seg;
seg.startPTS_ = time;
seg.m_endPts = time + segDuration; // ← Should be: time + durationThis defeats the purpose of the commit - the last segment will still have the full Fix: Change line 1840 to: seg.m_endPts = time + duration; |
5f4bc11 to
8e960cf
Compare
8e960cf to
49f03f8
Compare
Description
Seeking to end can makes video stall and audio continue from previous position, or both a/v return to previous position as if the seek had not occurred,
this can be caused from:
PosTimecalled by VP with a time that exceeds the total media time. For some reason that i dont have understood yet when you seek to the end (e.g. with keyboard) the VP callPosTimeby requesting a ms time that can go beyond the total time of duration of media. This can cause some mess such as video segment that cannot be found withFindByPTSOrNextwhere instead the audio is found due to possible segment misalignment, so video stall and audio continue to playSession::SeekTimecan triggerm_failedSeekTimebehaviorTimeSeekmethods was returning wrongly "true" when fails for EOS causing bad behaviorsi reworked a bit things also by removing
m_failedSeekTimeso now a possible fallback is handled always from thePosTimemethod and not from DemuxRead callbackThe last commit:
[DashTree] Allow generate segment beyond period boudariesconcern segment generated from DASH manifest SegmentTemplate,
where in case the last segment have a partial duration it was previously not created
this was causing video seek stall/freeze when you do a video seek that falls into the last missing segment
an complete example to reproduce the video seek freeze problem is on Issue: xbmc/xbmc#27816
Motivation and context
fix #1989
How has this been tested?
Screenshots (if appropriate):
Types of change
Checklist: