summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2011-11-25 23:59:23 +0200
committerUoti Urpala <uau@mplayer2.org>2011-11-25 23:59:23 +0200
commit8d6fc26bb982c5ecb7dbe4c20d51dec47f82abbf (patch)
tree60e7fca2028093bf454f0d62bd96b40c3e4ab7a4 /mplayer.c
parent9fae75b81ce2eb475db7652083b388e704833a72 (diff)
parent3215ec05fe27b1e07c863aadf4402c5bd6dbec33 (diff)
downloadmpv-8d6fc26bb982c5ecb7dbe4c20d51dec47f82abbf.tar.bz2
mpv-8d6fc26bb982c5ecb7dbe4c20d51dec47f82abbf.tar.xz
Merge branch 'screenshot' (early part)
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/mplayer.c b/mplayer.c
index eef8302aed..dec68c83fd 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -73,6 +73,7 @@
#include "mp_osd.h"
#include "libvo/video_out.h"
+#include "screenshot.h"
#include "sub/font_load.h"
#include "sub/sub.h"
@@ -791,6 +792,8 @@ void exit_player_with_rc(struct MPContext *mpctx, enum exit_reason how, int rc)
m_config_free(mpctx->mconfig);
mpctx->mconfig = NULL;
+ talloc_free(mpctx);
+
exit(rc);
}
@@ -3727,6 +3730,7 @@ static void run_playloop(struct MPContext *mpctx)
get_relative_time(mpctx);
}
print_status(mpctx, MP_NOPTS_VALUE, true);
+ screenshot_flip(mpctx);
} else
print_status(mpctx, MP_NOPTS_VALUE, false);
@@ -3959,7 +3963,8 @@ int main(int argc, char *argv[])
int opt_exit = 0;
int i;
- struct MPContext *mpctx = &(struct MPContext){
+ struct MPContext *mpctx = talloc(NULL, MPContext);
+ *mpctx = (struct MPContext){
.osd_function = OSD_PLAY,
.begin_skip = MP_NOPTS_VALUE,
.play_tree_step = 1,