0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00

Merge pull request #71 from fryshorts/master

Some minor fixes
This commit is contained in:
Jim 2014-04-26 12:57:20 -07:00
commit 160b44e417
3 changed files with 11 additions and 4 deletions

View File

@ -367,6 +367,7 @@ void video_output_stop(video_t video)
return;
if (video->initialized) {
video->initialized = false;
os_event_signal(video->stop_event);
pthread_join(video->thread, &thread_ret);
os_event_signal(video->update_event);

View File

@ -17,7 +17,7 @@
******************************************************************************/
/* Here we use xinerama to fetch data about monitor geometry
* Even if there are not multiple monitors, this should still work.
* Even if there are not multiple monitors, this should still work.
*/
#include <X11/Xlib.h>
@ -75,7 +75,7 @@ void GetMonitors(vector<MonitorInfo> &monitors)
screens = XineramaQueryScreens(display, &num_screens);
if (num_screens == 0 || !screens) {
if (num_screens == 0 || !screens) {
printf("Xinerama isn't active on this screen.\n");
return;
}
@ -86,13 +86,14 @@ void GetMonitors(vector<MonitorInfo> &monitors)
--num_screens;
monitors.emplace_back(
screens[num_screens].x_org,
screens[num_screens].x_org,
screens[num_screens].y_org,
screens[num_screens].width,
screens[num_screens].height
);
} while (num_screens > 0);
XFree(screens);
XCloseDisplay(display);
}

View File

@ -84,17 +84,21 @@ static inline void free_packets(struct rtmp_stream *stream)
}
}
static void rtmp_stream_stop(void *data);
static void rtmp_stream_destroy(void *data)
{
struct rtmp_stream *stream = data;
if (stream->active)
rtmp_stream_stop(data);
if (stream) {
free_packets(stream);
dstr_free(&stream->path);
dstr_free(&stream->key);
dstr_free(&stream->username);
dstr_free(&stream->password);
RTMP_Close(&stream->rtmp);
os_event_destroy(stream->stop_event);
os_sem_destroy(stream->send_sem);
pthread_mutex_destroy(&stream->packets_mutex);
@ -144,6 +148,7 @@ static void rtmp_stream_stop(void *data)
obs_output_end_data_capture(stream->output);
os_sem_post(stream->send_sem);
pthread_join(stream->send_thread, &ret);
RTMP_Close(&stream->rtmp);
}
os_event_reset(stream->stop_event);