#11444(ffmpeg:new): Overflow-2 in start_time_realtime calculation in rtsp.c
#11444: Overflow-2 in start_time_realtime calculation in rtsp.c -------------------------------------+------------------------------------- Reporter: | Type: defect IncrediBlame | Status: new | Priority: normal Component: ffmpeg | Version: git- Keywords: | master start_time_realtime RTSP RTCP | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Related to ticket #11388. Summary of the bug: start_time_realtime calculation was changed in release/7.1 branch: https://github.com/FFmpeg/FFmpeg/blob/bb85423142103d694d97bad1967bd3dc55440e... Which introduced overflow for current dates (e.g. Feb 1, 2024). Overflow was "fixed" here: https://github.com/FFmpeg/FFmpeg/commit/d72536008ac377164b00d214a2521e5ce604... Now same current dates are shown as year 1888, probably due to another overflow. How to reproduce: {{{ 1. Add pprintf after calculation above. 2. Build ffmpeg. 2. Run % ffmpeg -i some_rtsp_source -c copy abc.mp4 3. If rtsp source sends RTCP SR the code will eventually be hit, but sets the timestamp to some negative number. }}} Potential fix: {{{ s->start_time_realtime = av_rescale (rtpctx->first_rtcp_ntp_time >> 2, 1000000, 1LL << 30) - NTP_OFFSET_US; }}} should stop any overflow. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11444> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11444: Overflow-2 in start_time_realtime calculation in rtsp.c -------------------------------------+------------------------------------- Reporter: | Owner: (none) IncrediBlame | Type: defect | Status: new Priority: normal | Component: avformat Version: git-master | Resolution: Keywords: | Blocked By: start_time_realtime RTSP RTCP | Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by Jack Lau): * cc: Jack Lau (added) * component: ffmpeg => avformat Comment: Hi, I'm trying to reproduce this issue, but not meet any wrong result, the s->start_time_realtime is always right. Current date `UTC time: 2025-04-06 11:58:27.173080 UTC` printed very well So can you give me more details about this overflow? can you provide the value of rtpctx->first_rtcp_ntp_time so i can test? -- Ticket URL: <https://trac.ffmpeg.org/ticket/11444#comment:1> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11444: Overflow-2 in start_time_realtime calculation in rtsp.c -------------------------------------+------------------------------------- Reporter: | Owner: (none) IncrediBlame | Type: defect | Status: new Priority: normal | Component: avformat Version: git-master | Resolution: Keywords: | Blocked By: start_time_realtime RTSP RTCP | Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by IncrediBlame): I cannot reproduce the bug on master anymore: it returns correct dates. I was testing on an older commit, but don't remember which one exactly. So I guess it was fixed somehow. Case closed. -- Ticket URL: <https://trac.ffmpeg.org/ticket/11444#comment:2> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#11444: Overflow-2 in start_time_realtime calculation in rtsp.c -------------------------------------+------------------------------------- Reporter: | Owner: (none) IncrediBlame | Type: defect | Status: closed Priority: normal | Component: avformat Version: git-master | Resolution: fixed Keywords: | Blocked By: start_time_realtime RTSP RTCP | Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by IncrediBlame): * resolution: => fixed * status: new => closed -- Ticket URL: <https://trac.ffmpeg.org/ticket/11444#comment:3> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg