# HG changeset patch # User renatofilho # Date 1182525261 -3600 # Node ID 59623bb25c17e434fe6d5b4e92275475ee4ebf30 # Parent 4b5efa29028579b6cae7739dad775b6689cf2621 [svn r762] fixed bug with outputfile diff -r 4b5efa290285 -r 59623bb25c17 gmyth-stream/gmemcoder/src/gmencoder.c --- a/gmyth-stream/gmemcoder/src/gmencoder.c Tue Jun 19 22:01:13 2007 +0100 +++ b/gmyth-stream/gmemcoder/src/gmencoder.c Fri Jun 22 16:14:21 2007 +0100 @@ -866,6 +866,9 @@ if (strcmp(i[0], "fd") == 0) { priv->fd = atoi(i[1]); } else if (strcmp(i[0], "file") == 0) { + if (g_file_test (i[1], G_FILE_TEST_EXISTS)) { + g_assert (unlink (i[1]) == 0); + } priv->fd = open(i[1], O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); } else {