summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/ffmpeg/libavdevice/sdl.c
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/ffmpeg/libavdevice/sdl.c')
-rw-r--r--chromium/third_party/ffmpeg/libavdevice/sdl.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/chromium/third_party/ffmpeg/libavdevice/sdl.c b/chromium/third_party/ffmpeg/libavdevice/sdl.c
index 72d327e8e8d..b98aae5eeb2 100644
--- a/chromium/third_party/ffmpeg/libavdevice/sdl.c
+++ b/chromium/third_party/ffmpeg/libavdevice/sdl.c
@@ -71,12 +71,16 @@ static int sdl_write_trailer(AVFormatContext *s)
if (sdl->overlay)
SDL_FreeYUVOverlay(sdl->overlay);
+ sdl->overlay = NULL;
if (sdl->event_thread)
SDL_WaitThread(sdl->event_thread, NULL);
+ sdl->event_thread = NULL;
if (sdl->mutex)
SDL_DestroyMutex(sdl->mutex);
+ sdl->mutex = NULL;
if (sdl->init_cond)
SDL_DestroyCond(sdl->init_cond);
+ sdl->init_cond = NULL;
if (!sdl->sdl_was_already_inited)
SDL_Quit();
@@ -292,7 +296,7 @@ static int sdl_write_header(AVFormatContext *s)
/* wait until the video system has been inited */
SDL_LockMutex(sdl->mutex);
- if (!sdl->inited) {
+ while (!sdl->inited) {
SDL_CondWait(sdl->init_cond, sdl->mutex);
}
SDL_UnlockMutex(sdl->mutex);
@@ -354,6 +358,7 @@ static const AVClass sdl_class = {
.item_name = av_default_item_name,
.option = options,
.version = LIBAVUTIL_VERSION_INT,
+ .category = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT,
};
AVOutputFormat ff_sdl_muxer = {