xbmc / inputstream.rtmp

RTMP input stream add-on for Kodi
GNU General Public License v2.0
15 stars 26 forks source link

Problems with handling of "session" #17

Closed mwelinder closed 7 years ago

mwelinder commented 7 years ago
  1. If Open fails, session will be left non-null
  2. Nothing appears to call RTMP_free
notspiff commented 7 years ago
  1. I have added nulling of the ptr in https://github.com/notspiff/inputstream.rtmp/commit/6c1af46a59f59d8fe22f772ac53eee30968e242a
  2. It should be free'd, ref https://github.com/notspiff/inputstream.rtmp/blob/master/src/RTMPStream.cpp#L144
mwelinder commented 7 years ago

Thanks.

Re 2: you are referencing an RTMP_Close() call. That only closes the stream and frees some memory that was allocated as part of the RTMP_Connect and other calls.

Memory that was allocated with RTMP_Alloc() still needs to be freed with a call to RTMP_Free.

https://github.com/jaehyunp/rtmpdump/blob/master/librtmp/rtmp.c#L320 (not an official repository -- just what google gave me)

notspiff commented 7 years ago

right you are. funny, kodi has been doing this wrong for many years as i just copied the code from core. will fix, thanks.

On Mon, Mar 13, 2017 at 10:40 PM, mwelinder notifications@github.com wrote:

Thanks.

Re 2: you are referencing an RTMP_Close() call. That only closes the stream and frees some memory that was allocated as part of the RTMP_Connect and other calls.

Memory that was allocated with RTMP_Alloc() still needs to be freed with a call to RTMP_Free.

https://github.com/jaehyunp/rtmpdump/blob/master/librtmp/rtmp.c#L320 (not an official repository -- just what google gave me)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/notspiff/inputstream.rtmp/issues/17#issuecomment-286252532, or mute the thread https://github.com/notifications/unsubscribe-auth/AFktYJ_fYIKB-2hLCcmp0n6ZPW2UjTfBks5rlbfKgaJpZM4Marba .

notspiff commented 7 years ago

finally done. thx