vo_md5sum: support printing to stdout

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34313 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
This commit is contained in:
mplayer-svn 2011-11-06 09:09:26 +00:00 committed by wm4
parent b8c3a20f5e
commit 595928542a
1 changed files with 4 additions and 1 deletions

View File

@ -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);
}
/* ------------------------------------------------------------------------- */