Ignore:
Timestamp:
Jun 20, 2011 3:54:49 AM (13 years ago)
Author:
nanang
Message:

Re #1308:

  • Updated pcap parser component to skip trailer bytes that may exist in some network layers (was raising assertion).
  • Updated pcaputil app to allow dynamic payload type codecs.
  • Updated pcaputil app to be able to play decoded frames directly to audio device, instead of writing to WAV file.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/1.x/pjlib-util/src/pjlib-util/pcap.c

    r3553 r3588  
    369369        *udp_payload_size = sz; 
    370370 
     371        // Some layers may have trailer, e.g: link eth2. 
    371372        /* Check that we've read all the packets */ 
    372         PJ_ASSERT_RETURN(sz_read == rec_incl, PJ_EBUG); 
     373        //PJ_ASSERT_RETURN(sz_read == rec_incl, PJ_EBUG); 
     374 
     375        /* Skip trailer */ 
     376        while (sz_read < rec_incl) { 
     377            sz = rec_incl - sz_read; 
     378            status = read_file(file, &tmp.eth, &sz); 
     379            if (status != PJ_SUCCESS) { 
     380                TRACE_((file->obj_name, "Error reading trailer: %d", status)); 
     381                return status; 
     382            } 
     383            sz_read += sz; 
     384        } 
    373385 
    374386        return PJ_SUCCESS; 
Note: See TracChangeset for help on using the changeset viewer.