summaryrefslogtreecommitdiff
path: root/ffplay.c
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2013-01-27 00:45:47 +0100
committerMarton Balint <cus@passwd.hu>2013-02-02 12:38:14 +0100
commit4fd6e5af1e334875eca4f803bbcfac9219b0524a (patch)
tree9f941fdc7c49edcd60a4f05d553bfa3859e55841 /ffplay.c
parent571ef42dd4eb260b213464ed15d288a887b6679a (diff)
ffplay: fix order of setting show_mode
Without the fix the refresh event may have got called with unset show mode. Fixes ticket #2174. Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ffplay.c b/ffplay.c
index 96a2ee1304..6cdbafe68c 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2641,10 +2641,11 @@ static int read_thread(void *arg)
if (st_index[AVMEDIA_TYPE_VIDEO] >= 0) {
ret = stream_component_open(is, st_index[AVMEDIA_TYPE_VIDEO]);
}
- is->refresh_tid = SDL_CreateThread(refresh_thread, is);
if (is->show_mode == SHOW_MODE_NONE)
is->show_mode = ret >= 0 ? SHOW_MODE_VIDEO : SHOW_MODE_RDFT;
+ is->refresh_tid = SDL_CreateThread(refresh_thread, is);
+
if (st_index[AVMEDIA_TYPE_SUBTITLE] >= 0) {
stream_component_open(is, st_index[AVMEDIA_TYPE_SUBTITLE]);
}