if (!(vcontext = acontext->vcontext)) {
return;
}
+ } else {
+ return;
}
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Got a libvlc_MediaStateChanged callback. New state: %d\n", new_state);
if (!(vcontext = acontext->vcontext)) {
return;
}
+ } else {
+ return;
}
switch_mutex_lock(vcontext->audio_mutex);
int32_t offset = 250;
const char *tmp;
vlc_file_context_t *acontext = handle->private_info;
- const char * opts[25] = {
- *vlc_args,
- switch_core_sprintf(acontext->pool, "--sout=%s", acontext->path)
- };
+ const char * opts[25] = {0};
int argc = 2;
vlc_video_context_t *vcontext;
+ opts[0] = *vlc_args;
+ if (acontext) opts[1] = switch_core_sprintf(acontext->pool, "--sout=%s", acontext->path);
+
vcontext = acontext->vcontext;
pool = acontext->pool;
if (!(vcontext = acontext->vcontext)) {
return SWITCH_STATUS_FALSE;
}
+ } else {
+ return SWITCH_STATUS_FALSE;
}
- if (vcontext->err) {
+ if (vcontext && vcontext->err) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "VLC ended\n");
return SWITCH_STATUS_GENERR;
}
if (!(vcontext = acontext->vcontext)) {
return SWITCH_STATUS_FALSE;
}
+ } else {
+ return SWITCH_STATUS_FALSE;
}
if (vcontext->err) {