• Boris Nagels's avatar
    avformat/rtpenc: Fix integer overflow in NTP_TO_RTP_FORMAT · 1109ed79
    Boris Nagels authored
    RTCP synchronization packet was broken since commit in ffmpeg version > 2.8.3
    (commit: e04b039b1528f4c7df5c2b93865651bfea168a19) Since this commit (2e814d03)
    "rtpenc: Simplify code by introducing a macro for rescaling NTP timestamps", NTP_TO_RTP_FORMAT
    uses av_rescale_rnd() function to add the data to the packet.
    
    This causes an overflow in the av_rescale_rnd() function and it will return INT64_MIN.
    Causing the NTP stamp in the RTCP packet to have an invalid value.
    
    Github: Closes #182
    
    Reverting commit '2e814d03' solves the problem.
    1109ed79
rtpenc.c 20.7 KB