Fix bug where FLAC-to-FLAC transcoding of a corrupted FLAC file would truncate the...
authorJosh Coalson <jcoalson@users.sourceforce.net>
Thu, 14 Dec 2006 01:08:15 +0000 (01:08 +0000)
committerJosh Coalson <jcoalson@users.sourceforce.net>
Thu, 14 Dec 2006 01:08:15 +0000 (01:08 +0000)
doc/html/changelog.html
src/flac/encode.c

index 4faea60..494a6ac 100644 (file)
@@ -85,6 +85,7 @@
                                flac:
                                <ul>
                                        <li>Fixed a bug that caused suboptimal default compression settings in some locales (<a href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1608883&amp;group_id=13478&amp;atid=113478">SF #1608883</a>).</li>
+                                       <li>Fixed a bug where FLAC-to-FLAC transcoding of a corrupted FLAC file would truncate the transcoded file at the first error (<a href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1615019&amp;group_id=13478&amp;atid=113478">SF #1615019</a>).</li>
                                </ul>
                        </li>
                        <li>
index 560ad52..5ec2be1 100644 (file)
@@ -1486,6 +1486,10 @@ int flac__encode_flac(FILE *infile, off_t infilesize, const char *infilename, co
                                goto fubar2; /*@@@ yuck */
                        }
                }
+               if(decoder_data.fatal_error) {
+                       flac__utils_printf(stderr, 1, "%s: ERROR: while decoding FLAC input, state = %s\n", encoder_session.inbasefilename, FLAC__stream_decoder_get_resolved_state_string(decoder));
+                       goto fubar2; /*@@@ yuck */
+               }
        }
 
        FLAC__stream_decoder_delete(decoder);