[FFmpeg-cvslog] ffplay: fix order of setting show_mode
Marton Balint
git at videolan.org
Sat Feb 2 16:18:54 CET 2013
ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Sun Jan 27 00:45:47 2013 +0100| [4fd6e5af1e334875eca4f803bbcfac9219b0524a] | committer: Marton Balint
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 at passwd.hu>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4fd6e5af1e334875eca4f803bbcfac9219b0524a
---
ffplay.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ffplay.c b/ffplay.c
index 96a2ee1..6cdbafe 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]);
}
More information about the ffmpeg-cvslog
mailing list