diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-05-30 15:42:42 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-05-30 15:51:33 +0300 |
commit | e74361c48822accc0413cae6911efaf6bc7a2b5f (patch) | |
tree | a851bbae7f1aac9a46f57877baa2ef72cf82487b | |
parent | 1ffe8bece5922b344d750394a0fdd4e6e5794c82 (diff) | |
parent | 0dd2ddd2bc71bb180811eae73ecc15c526520144 (diff) | |
download | mpv-e74361c48822accc0413cae6911efaf6bc7a2b5f.tar.bz2 mpv-e74361c48822accc0413cae6911efaf6bc7a2b5f.tar.xz |
Merge svn changes up to r31189
-rw-r--r-- | DOCS/man/zh_CN/mplayer.1 | 16 | ||||
-rw-r--r-- | libao2/ao_pcm.c | 6 | ||||
-rw-r--r-- | libmpcodecs/vf_geq.c | 6 | ||||
-rw-r--r-- | libmpcodecs/vf_qp.c | 12 | ||||
-rw-r--r-- | libvo/w32_common.c | 18 | ||||
-rw-r--r-- | libvo/x11_common.c | 4 |
6 files changed, 37 insertions, 25 deletions
diff --git a/DOCS/man/zh_CN/mplayer.1 b/DOCS/man/zh_CN/mplayer.1 index e1cd17f48f..30cc8a3c5a 100644 --- a/DOCS/man/zh_CN/mplayer.1 +++ b/DOCS/man/zh_CN/mplayer.1 @@ -1,4 +1,4 @@ -.\" sync with en/mplayer.1 rev. 31028 +.\" sync with en/mplayer.1 rev. 31173 .\" Encoding: UTF-8 .\" Reminder of hard terms which need better/final solution later: .\" /capture; playtree in parent list; colorkey; retrace; desync; downmix; @@ -3899,10 +3899,11 @@ mga 视频输出驱动, 运行在 X11 窗口。 .PD 1 . .TP -.B s3fb(仅适用于Linux)(另参见 \-vf yuv2 和 \-dr) -S3 Virge专用的视频输出驱动。 -此驱动支持显卡的YUV转换与缩放、双重缓冲和直接渲染的功能。 -使用\-vf yuy2以采用硬件加速下的YUV2渲染,这种方式在此款显卡下比YV12快很多。 +.B s3fb(仅适用于 Linux )(另参见 \-dr) +S3 Virge 专用的视频输出驱动。 +此驱动支持显卡的 YUV 转换与缩放、双重缓冲和直接渲染的功能。 +使用 \-vf format=yuy2 以采用硬件加速下的 YUV2 渲染,这种方式 +在此款显卡下比 YV12 快很多。 .PD 0 .RSs .IPs <device> @@ -5670,11 +5671,6 @@ spal: 768x576 (正方形像素PAL) .RE . .TP -.B "yuy2\ \ \ " -强制执行YV12/\:I420/\:422P至YUY2的软件转换。 -对于那些对YV12支持较差但对YUY2支持较好的显卡很有用。 -. -.TP .B "yvu9\ \ \ " 强制执行YVU9至YV12色彩空间的软件转换。 不赞成使用,因为使用软件色彩调整器更好。 diff --git a/libao2/ao_pcm.c b/libao2/ao_pcm.c index 3639647284..0c86977b62 100644 --- a/libao2/ao_pcm.c +++ b/libao2/ao_pcm.c @@ -209,9 +209,11 @@ static void uninit(int immed){ #endif if (broken_seek || fseek(fp, 0, SEEK_SET) != 0) mp_msg(MSGT_AO, MSGL_ERR, "Could not seek to start, WAV size headers not updated!\n"); - else if (data_length > 0x7ffff000) - mp_msg(MSGT_AO, MSGL_ERR, "File larger than allowed for WAV files, may play truncated!\n"); else { + if (data_length > 0xfffff000) { + mp_msg(MSGT_AO, MSGL_ERR, "File larger than allowed for WAV files, may play truncated!\n"); + data_length = 0xfffff000; + } write_wave_header(fp, data_length); } } diff --git a/libmpcodecs/vf_geq.c b/libmpcodecs/vf_geq.c index 1b67b10203..46f449b811 100644 --- a/libmpcodecs/vf_geq.c +++ b/libmpcodecs/vf_geq.c @@ -178,11 +178,11 @@ static int vf_open(vf_instance_t *vf, char *args){ plane==0 ? lum : (plane==1 ? cb : cr), NULL }; - char * a; - vf->priv->e[plane] = ff_parse_expr(eq[plane], const_names, NULL, NULL, func2, func2_names, &a); + vf->priv->e[plane] = ff_parse_expr(eq[plane], const_names, NULL, NULL, func2_names, func2, 0, NULL); if (!vf->priv->e[plane]) { - mp_msg(MSGT_VFILTER, MSGL_ERR, "geq: error loading equation `%s': %s\n", eq[plane], a); + mp_msg(MSGT_VFILTER, MSGL_ERR, "geq: error loading equation `%s'\n", eq[plane]); + return 0; } } diff --git a/libmpcodecs/vf_qp.c b/libmpcodecs/vf_qp.c index f7e8b377fe..fa25a4508f 100644 --- a/libmpcodecs/vf_qp.c +++ b/libmpcodecs/vf_qp.c @@ -66,11 +66,15 @@ static int config(struct vf_instance *vf, "qp", NULL }; + double temp_val; - const char *error = NULL; - vf->priv->lut[i+129]= lrintf(ff_parse_and_eval_expr(vf->priv->eq, const_values, const_names, NULL, NULL, NULL, NULL, NULL, &error)); - if (error) - mp_msg(MSGT_VFILTER, MSGL_ERR, "qp: Error evaluating \"%s\": %s\n", vf->priv->eq, error); + temp_val= ff_parse_and_eval_expr(vf->priv->eq, const_names, const_values, NULL, NULL, NULL, NULL, NULL, 0, NULL); + + if (isnan(temp_val)){ + mp_msg(MSGT_VFILTER, MSGL_ERR, "qp: Error evaluating \"%s\" \n", vf->priv->eq); + return 0; + } + vf->priv->lut[i+129]= lrintf(temp_val); } return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); diff --git a/libvo/w32_common.c b/libvo/w32_common.c index 3b9cc9ab2b..615b4e61a2 100644 --- a/libvo/w32_common.c +++ b/libvo/w32_common.c @@ -203,15 +203,19 @@ int vo_w32_check_events(void) { DispatchMessage(&msg); } if (WinID >= 0) { + BOOL res; RECT r; - GetClientRect(vo_window, &r); - if (r.right != vo_dwidth || r.bottom != vo_dheight) { + res = GetClientRect(vo_window, &r); + if (res && (r.right != vo_dwidth || r.bottom != vo_dheight)) { vo_dwidth = r.right; vo_dheight = r.bottom; event_flags |= VO_EVENT_RESIZE; } - GetClientRect(WinID, &r); - if (r.right != vo_dwidth || r.bottom != vo_dheight) + res = GetClientRect(WinID, &r); + if (res && (r.right != vo_dwidth || r.bottom != vo_dheight)) MoveWindow(vo_window, 0, 0, r.right, r.bottom, FALSE); + if (!IsWindow(WinID)) + // Window has probably been closed, e.g. due to program crash + mplayer_put_key(KEY_CLOSE_WIN); } return event_flags; @@ -389,7 +393,7 @@ static int createRenderingContext(void) { int vo_w32_config(uint32_t width, uint32_t height, uint32_t flags) { // we already have a fully initialized window, so nothing needs to be done if (flags & VOFLAG_HIDDEN) - return; + return 1; // store original size for videomode switching o_dwidth = width; o_dheight = height; @@ -409,6 +413,7 @@ int vo_w32_config(uint32_t width, uint32_t height, uint32_t flags) { /** * \brief return the name of the selected device if it is indepedant + * \return pointer to string, must be freed. */ static char *get_display_name(void) { DISPLAY_DEVICE disp; @@ -416,7 +421,7 @@ static char *get_display_name(void) { EnumDisplayDevices(NULL, vo_adapter_num, &disp, 0); if (disp.StateFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP) return NULL; - return disp.DeviceName; + return strdup(disp.DeviceName); } /** @@ -493,6 +498,7 @@ int vo_w32_init(void) { dev_hdc = 0; dev = get_display_name(); if (dev) dev_hdc = CreateDC(dev, NULL, NULL, NULL); + free(dev); updateScreenProperties(); vo_hdc = vo_w32_get_dc(vo_window); diff --git a/libvo/x11_common.c b/libvo/x11_common.c index 056c452b2d..b9da242c46 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -861,6 +861,10 @@ int vo_x11_check_events(struct vo *vo) XSetWMNormalHints(display, x11->window, &x11->vo_hint); x11->fs_flip = 0; break; + case DestroyNotify: + mp_msg(MSGT_VO, MSGL_WARN, "Our window was destroyed, exiting\n"); + mplayer_put_key(vo->key_fifo, KEY_CLOSE_WIN); + break; case ClientMessage: if (Event.xclient.message_type == x11->XAWM_PROTOCOLS && Event.xclient.data.l[0] == x11->XAWM_DELETE_WINDOW) |