From ef3c4368a362c6e903627bb43ec212023b11375b Mon Sep 17 00:00:00 2001 From: Damiano Galassi Date: Fri, 19 Aug 2016 13:43:26 +0200 Subject: [PATCH] Comment out some debug messages. --- MP42/MP42MkvImporter.m | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/MP42/MP42MkvImporter.m b/MP42/MP42MkvImporter.m index e207269..d91084c 100644 --- a/MP42/MP42MkvImporter.m +++ b/MP42/MP42MkvImporter.m @@ -75,7 +75,9 @@ static int readMkvPacket(struct StdIoStream *ioStream, TrackInfo *trackInfo, ui uint32_t iSize = *FrameSize; if (fseeko(ioStream->fp, FilePos, SEEK_SET)) { +#ifdef DEBUG fprintf(stderr,"fseeko(): %s\n", strerror(errno)); +#endif return 0; } @@ -94,12 +96,21 @@ static int readMkvPacket(struct StdIoStream *ioStream, TrackInfo *trackInfo, ui size_t rd = fread(packet + trackInfo->CompMethodPrivateSize, 1, iSize, ioStream->fp); if (rd != iSize) { if (rd == 0) { - if (feof(ioStream->fp)) + if (feof(ioStream->fp)) { +#ifdef DEBUG fprintf(stderr,"Unexpected EOF while reading frame\n"); - else +#endif + } + else { +#ifdef DEBUG fprintf(stderr,"Error reading frame: %s\n",strerror(errno)); - } else - fprintf(stderr,"Short read while reading audio frame\n"); +#endif + } + } else { +#ifdef DEBUG + fprintf(stderr,"Short read while reading frame\n"); +#endif + } free(packet); return 0;