summaryrefslogtreecommitdiffstats
path: root/libvo/video_out.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-08-06 17:52:17 +0200
committerwm4 <wm4@nowhere>2012-08-06 17:52:17 +0200
commitc7b66d99d1830685ec3761ebf0a3625dee69f5d1 (patch)
treeb932c03a1c892694fdd207b88104bbafe26369e5 /libvo/video_out.c
parentb43adea6c850a3f8e8660428cfa4875e3d698ea6 (diff)
downloadmpv-c7b66d99d1830685ec3761ebf0a3625dee69f5d1.tar.bz2
mpv-c7b66d99d1830685ec3761ebf0a3625dee69f5d1.tar.xz
vo_image: add new video output for writing images
This is supposed to replace vo_png and others.
Diffstat (limited to 'libvo/video_out.c')
-rw-r--r--libvo/video_out.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libvo/video_out.c b/libvo/video_out.c
index 5dad7e2be4..c453907272 100644
--- a/libvo/video_out.c
+++ b/libvo/video_out.c
@@ -82,6 +82,7 @@ extern struct vo_driver video_out_gl;
extern struct vo_driver video_out_gl3;
extern struct vo_driver video_out_null;
extern struct vo_driver video_out_png;
+extern struct vo_driver video_out_image;
extern struct vo_driver video_out_caca;
extern struct vo_driver video_out_yuv4mpeg;
extern struct vo_driver video_out_direct3d;
@@ -146,6 +147,7 @@ const struct vo_driver *video_out_drivers[] =
&video_out_yuv4mpeg,
#endif
&video_out_png,
+ &video_out_image,
#ifdef CONFIG_JPEG
&video_out_jpeg,
#endif
@@ -172,8 +174,11 @@ const struct vo_driver *video_out_drivers[] =
static int vo_preinit(struct vo *vo, char *arg)
{
- if (vo->driver->priv_size)
+ if (vo->driver->priv_size) {
vo->priv = talloc_zero_size(vo, vo->driver->priv_size);
+ if (vo->driver->priv_defaults)
+ memcpy(vo->priv, vo->driver->priv_defaults, vo->driver->priv_size);
+ }
if (vo->driver->options) {
struct m_config *cfg = m_config_simple(vo->priv);
talloc_steal(vo->priv, cfg);