diff options
author | mplayer-svn <svn@mplayerhq.hu> | 2011-11-06 09:09:26 +0000 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-08-03 01:33:12 +0200 |
commit | 595928542a51269e0bf34bdf8bef5392db099c72 (patch) | |
tree | c623540bb99b212a1a077dc1172b411bd503becb /libvo | |
parent | b8c3a20f5e3d8b51a2528afdb129d3fac03ad9fd (diff) | |
download | mpv-595928542a51269e0bf34bdf8bef5392db099c72.tar.bz2 mpv-595928542a51269e0bf34bdf8bef5392db099c72.tar.xz |
vo_md5sum: support printing to stdout
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34313 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
Diffstat (limited to 'libvo')
-rw-r--r-- | libvo/vo_md5sum.c | 5 |
1 files changed, 4 insertions, 1 deletions
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); } /* ------------------------------------------------------------------------- */ |