• Martin Storsjö's avatar
    rtsp: Don't store RTSPStream in AVStream->priv_data · c6347bdf
    Martin Storsjö authored
    For mpegts in RTP, there isn't a direct mapping between RTSPStreams
    and AVStreams, and the RTSPStream isn't ever stored in
    AVStream->priv_data, which was earlier leaked. The fix for this
    leak, in ea7f0807, lead to
    double frees for other, normal RTP streams.
    
    This patch avoids storing RTSPStreams in AVStream->priv_data, thus
    avoiding the double free. The RTSPStreams are always available via
    RTSPState->rtsp_streams anyway.
    
    Tested with MS-RTSP, RealRTSP, DSS and mpegts/RTP.
    Signed-off-by: 's avatarLuca Barbato <lu_zero@gentoo.org>
    (cherry picked from commit d9c0510e)
    c6347bdf
rtspenc.c 7.57 KB