aboutsummaryrefslogtreecommitdiffstats
path: root/ffplay.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2006-12-30 11:32:10 +0000
committerMichael Niedermayer <michaelni@gmx.at>2006-12-30 11:32:10 +0000
commitc03312ccac3c22a24886744ff1c81c4b1d4191f9 (patch)
tree641eca5a667ff1be5edb4fb5838c51e76b8d78a6 /ffplay.c
parentfccb19e3c500a3877fbd3e595410596da096df11 (diff)
downloadffmpeg-c03312ccac3c22a24886744ff1c81c4b1d4191f9.tar.gz
remove code duplication
Originally committed as revision 7386 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/ffplay.c b/ffplay.c
index 11ae3aa544..e0b53bccfd 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -2142,26 +2142,13 @@ static void stream_cycle_channel(VideoState *is, int codec_type)
static void toggle_full_screen(void)
{
- int w, h, flags;
is_full_screen = !is_full_screen;
if (!fs_screen_width) {
/* use default SDL method */
SDL_WM_ToggleFullScreen(screen);
} else {
/* use the recorded resolution */
- flags = SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_HWACCEL;
- if (is_full_screen) {
- w = fs_screen_width;
- h = fs_screen_height;
- flags |= SDL_FULLSCREEN;
- } else {
- w = screen_width;
- h = screen_height;
- flags |= SDL_RESIZABLE;
- }
- screen = SDL_SetVideoMode(w, h, 0, flags);
- cur_stream->width = w;
- cur_stream->height = h;
+ video_open(cur_stream);
}
}