From 595928542a51269e0bf34bdf8bef5392db099c72 Mon Sep 17 00:00:00 2001 From: mplayer-svn Date: Sun, 6 Nov 2011 09:09:26 +0000 Subject: vo_md5sum: support printing to stdout git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34313 b3059339-0415-0410-9bf9-f77b7e298cf2 Author: reimar --- libvo/vo_md5sum.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libvo/vo_md5sum.c b/libvo/vo_md5sum.c index 9c9a4d2f97..0ffc2f0c61 100644 --- a/libvo/vo_md5sum.c +++ b/libvo/vo_md5sum.c @@ -137,6 +137,9 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, 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, _("Unable to create output file.")); @@ -273,7 +276,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); } /* ------------------------------------------------------------------------- */ -- cgit v1.2.3