Changeset 279


Ignore:
Timestamp:
04/19/07 19:56:13 (18 years ago)
Author:
r2d
Message:

can now use mpcdec to check if a file is corrupted

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libmpc/branches/r2d/mpcdec/mpcdec.c

    r256 r279  
    105105        frame.buffer = sample_buffer;
    106106        begin        = clock();
    107         mpc_demux_decode(demux, &frame);
     107        err = mpc_demux_decode(demux, &frame);
    108108        end          = clock();
    109109        if(frame.bits == -1) break;
     
    117117    }
    118118
     119        if (err != MPC_STATUS_OK)
     120                printf("An error occured while decoding\n");
     121
    119122    printf("%u samples ", total_samples);
    120         if (sum <= 0)
    121                 sum = 1;
     123        if (sum <= 0) sum = 1;
    122124        total_samples = (mpc_uint32_t) ((mpc_uint64_t) total_samples * CLOCKS_PER_SEC * 100 / ((mpc_uint64_t)si.sample_freq * sum));
    123125    printf("decoded in %u ms (%u.%02ux)\n",
     
    139141    _CrtDumpMemoryLeaks();
    140142#endif
    141     return 0;
     143    return err;
    142144}
Note: See TracChangeset for help on using the changeset viewer.