Changeset 489


Ignore:
Timestamp:
01/13/16 00:33:48 (9 years ago)
Author:
r2d
Message:

mpc2sv8 : fix a segfault caused by commit r476

Location:
libmpc/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • libmpc/trunk/include/mpc/mpcdec.h

    r431 r489  
    117117/// decode frame
    118118MPC_API mpc_status mpc_demux_decode(mpc_demux * d, mpc_frame_info * i);
     119/// decode frame : use mpc_demux_decode() instead. This function is only used by mpc2sv8.
     120MPC_API mpc_status mpc_demux_decode_inner(mpc_demux * d, mpc_frame_info * i);
    119121/// get streaminfo
    120122MPC_API void mpc_demux_get_info(mpc_demux * d, mpc_streaminfo * i);
  • libmpc/trunk/libmpcdec/mpc_demux.c

    r478 r489  
    567567}
    568568
    569 static mpc_status mpc_demux_decode_inner(mpc_demux * d, mpc_frame_info * i)
     569mpc_status mpc_demux_decode_inner(mpc_demux * d, mpc_frame_info * i)
    570570{
    571571        mpc_bits_reader r;
  • libmpc/trunk/mpc2sv8/mpc2sv8.c

    r473 r489  
    163163
    164164                demux->d->samples_to_skip = MPC_FRAME_LENGTH + MPC_DECODER_SYNTH_DELAY;
    165                 err = mpc_demux_decode(demux, &frame);
    166 
    167                 if(frame.bits == -1) break;
     165        err = mpc_demux_decode_inner(demux, &frame);
     166
     167        if (MPC_IS_FAILURE(err) || frame.bits == -1) break;
    168168
    169169                datacpy(demux->d, &e);
Note: See TracChangeset for help on using the changeset viewer.