mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-21 19:02:06 +00:00
[mod_vlc] scan-build: Access to field 'context' results in a dereference of a null pointer (loaded from variable 'tech_pvt');
Access to field 'pool' results in a dereference of a null pointer (loaded from variable 'acontext')
This commit is contained in:
parent
695ba877aa
commit
3c51052d49
@ -593,9 +593,12 @@ static switch_status_t av_init_handle(switch_file_handle_t *handle, switch_image
|
|||||||
int argc = 2;
|
int argc = 2;
|
||||||
vlc_video_context_t *vcontext;
|
vlc_video_context_t *vcontext;
|
||||||
|
|
||||||
|
if (!acontext) {
|
||||||
|
return SWITCH_STATUS_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
opts[0] = *vlc_args;
|
opts[0] = *vlc_args;
|
||||||
if (acontext) opts[1] = switch_core_sprintf(acontext->pool, "--sout=%s", acontext->path);
|
opts[1] = switch_core_sprintf(acontext->pool, "--sout=%s", acontext->path);
|
||||||
|
|
||||||
pool = acontext->pool;
|
pool = acontext->pool;
|
||||||
|
|
||||||
@ -2250,9 +2253,7 @@ static switch_status_t channel_on_consume_media(switch_core_session_t *session)
|
|||||||
|
|
||||||
static switch_status_t channel_on_destroy(switch_core_session_t *session)
|
static switch_status_t channel_on_destroy(switch_core_session_t *session)
|
||||||
{
|
{
|
||||||
vlc_private_t *tech_pvt = switch_core_session_get_private(session);
|
vlc_private_t *tech_pvt;
|
||||||
|
|
||||||
switch_assert(tech_pvt && tech_pvt->context);
|
|
||||||
|
|
||||||
if ((tech_pvt = switch_core_session_get_private(session))) {
|
if ((tech_pvt = switch_core_session_get_private(session))) {
|
||||||
|
|
||||||
@ -2267,6 +2268,8 @@ static switch_status_t channel_on_destroy(switch_core_session_t *session)
|
|||||||
switch_media_handle_destroy(session);
|
switch_media_handle_destroy(session);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch_assert(tech_pvt && tech_pvt->context);
|
||||||
|
|
||||||
switch_yield(50000);
|
switch_yield(50000);
|
||||||
|
|
||||||
if (tech_pvt->context->mp) libvlc_media_player_stop(tech_pvt->context->mp);
|
if (tech_pvt->context->mp) libvlc_media_player_stop(tech_pvt->context->mp);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user