Changeset 4339 for pjproject/trunk


Ignore:
Timestamp:
Jan 31, 2013 5:23:46 AM (12 years ago)
Author:
ming
Message:

Re #1608: Try to store the number of frames in the packet in case SKP_Silk_SDK_get_TOC() couldn't return the correct number of frames during decode
This was reported to happen in SILK ARM version (thanks to Marcus for the report)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia-codec/silk.c

    r4328 r4339  
    772772        frames[i].type = PJMEDIA_FRAME_TYPE_AUDIO; 
    773773        frames[i].bit_info = (((unsigned)ts->u64 & 0xFFFF) << 16) | 
    774                               (((unsigned)pkt & 0xFF) << 8) | i; 
     774                              (((unsigned)pkt & 0xFF) << 8) | 
     775                              (toc.framesInPacket << 4) | i; 
    775776        frames[i].buf = pkt; 
    776777        frames[i].size = pkt_size; 
     
    801802    frm_info = input->bit_info & 0xF; 
    802803 
     804    if (toc.framesInPacket == 0) { 
     805        /* In SILK ARM version, the table of content can indicate 
     806         * that the number of frames in the packet is 0. 
     807         * Try to get the number of frames in packet that we save 
     808         * in the frame instead. 
     809         */ 
     810        toc.framesInPacket = (input->bit_info & 0xF0) >> 4; 
     811    } 
     812     
    803813    if (toc.framesInPacket == 0) { 
    804814        output->size = 0; 
Note: See TracChangeset for help on using the changeset viewer.