Mercurial > mplayer.hg
changeset 34774:2402be2e296f
Allow using -vo yuv4mpeg for files with resolution changes.
Not all programs can read such files.
author | reimar |
---|---|
date | Sun, 15 Apr 2012 15:23:43 +0000 |
parents | 37af463fd7fc |
children | c51421660d5e |
files | libvo/vo_yuv4mpeg.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/vo_yuv4mpeg.c Sun Apr 15 15:09:34 2012 +0000 +++ b/libvo/vo_yuv4mpeg.c Sun Apr 15 15:23:43 2012 +0000 @@ -105,7 +105,6 @@ "Video formats differ (w:%i=>%i, h:%i=>%i, fps:%f=>%f), " "restarting output.\n", image_width, width, image_height, height, image_fps, vo_fps); - uninit(); } image_height = height; image_width = width; @@ -130,9 +129,11 @@ } write_bytes = image_width * image_height * 3 / 2; + free(image); image = malloc(write_bytes); - yuv_out = strcmp(yuv_filename, "-") ? fopen(yuv_filename, "wb") : stdout; + if (!yuv_out) + yuv_out = strcmp(yuv_filename, "-") ? fopen(yuv_filename, "wb") : stdout; if (!yuv_out || image == 0) { mp_msg(MSGT_VO,MSGL_FATAL,