Changeset 3846


Ignore:
Timestamp:
Oct 25, 2011 3:49:59 AM (13 years ago)
Author:
bennylp
Message:

WAV playback is cut in the end if pjmedia_wav_player_port_set_pos() is called. Thanks Eize Slange for the patch (re #1252)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/1.x/pjmedia/src/pjmedia/wav_player.c

    r3553 r3846  
    463463    fport = (struct file_reader_port*) port; 
    464464 
    465     PJ_ASSERT_RETURN(bytes < fport->fsize - fport->start_data, PJ_EINVAL); 
     465    /* Check that this offset does not pass the audio-data (in case of 
     466     * extra chunk after audio data chunk 
     467     */ 
     468    PJ_ASSERT_RETURN(bytes < fport->data_len, PJ_EINVAL); 
    466469 
    467470    fport->fpos = fport->start_data + bytes; 
     471    fport->data_left = fport->data_len - bytes; 
    468472    pj_file_setpos( fport->fd, fport->fpos, PJ_SEEK_SET); 
    469473 
Note: See TracChangeset for help on using the changeset viewer.