fix bug: explicitly close output file in Ogg FLAC case
authorJosh Coalson <jcoalson@users.sourceforce.net>
Mon, 30 Dec 2002 23:28:22 +0000 (23:28 +0000)
committerJosh Coalson <jcoalson@users.sourceforce.net>
Mon, 30 Dec 2002 23:28:22 +0000 (23:28 +0000)
src/flac/encode.c

index 63c495b..9748365 100644 (file)
@@ -1245,6 +1245,8 @@ void EncoderSession_destroy(EncoderSession *e)
 {
        if(e->fin != stdin)
                fclose(e->fin);
+       if(0 != e->fout && e->fout != stdout)
+               fclose(e->fout);
 
 #ifdef FLAC__HAS_OGG
        if(e->use_ogg) {