[MPlayer-cvslog] r34313 - trunk/libvo/vo_md5sum.c
reimar
subversion at mplayerhq.hu
Sun Nov 6 10:09:26 CET 2011
Author: reimar
Date: Sun Nov 6 10:09:26 2011
New Revision: 34313
Log:
vo md5sum: support printing to stdout.
Modified:
trunk/libvo/vo_md5sum.c
Modified: trunk/libvo/vo_md5sum.c
==============================================================================
--- trunk/libvo/vo_md5sum.c Sun Nov 6 10:01:46 2011 (r34312)
+++ trunk/libvo/vo_md5sum.c Sun Nov 6 10:09:26 2011 (r34313)
@@ -140,6 +140,9 @@ static int config(uint32_t width, uint32
return 0;
}
+ if (strcmp(md5sum_outfile, "-") == 0)
+ md5sum_fd = stdout;
+ else
if ( (md5sum_fd = fopen(md5sum_outfile, "w") ) == NULL ) {
mp_msg(MSGT_VO, MSGL_ERR, "\n%s: %s\n", info.short_name,
MSGTR_VO_CantCreateFile);
@@ -276,7 +279,7 @@ static void uninit(void)
{
free(md5sum_outfile);
md5sum_outfile = NULL;
- if (md5sum_fd) fclose(md5sum_fd);
+ if (md5sum_fd && md5sum_fd != stdout) fclose(md5sum_fd);
}
/* ------------------------------------------------------------------------- */
More information about the MPlayer-cvslog
mailing list