[MPlayer-cvslog] r34862 - trunk/libvo/vo_yuv4mpeg.c

reimar subversion at mplayerhq.hu
Sun Apr 15 17:23:43 CEST 2012


Author: reimar
Date: Sun Apr 15 17:23:43 2012
New Revision: 34862

Log:
Allow using -vo yuv4mpeg for files with resolution changes.

Not all programs can read such files.

Modified:
   trunk/libvo/vo_yuv4mpeg.c

Modified: trunk/libvo/vo_yuv4mpeg.c
==============================================================================
--- trunk/libvo/vo_yuv4mpeg.c	Sun Apr 15 17:09:34 2012	(r34861)
+++ trunk/libvo/vo_yuv4mpeg.c	Sun Apr 15 17:23:43 2012	(r34862)
@@ -105,7 +105,6 @@ static int config(uint32_t width, uint32
 	    "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 @@ static int config(uint32_t width, uint32
 	}
 
 	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,


More information about the MPlayer-cvslog mailing list