Changeset 0bcda15e362b5e00fd4b6f458206ac52035b217d

Show
Ignore:
Timestamp:
06/06/08 11:38:47 (3 months ago)
Author:
Rafaël Carré <funman@videolan.org>
git-committer:
Rafaël Carré <funman@videolan.org> 1212745127 +0200
git-parent:

[8e95f585aa1986e02153ed407abf00d998d8af3b]

git-author:
Rafaël Carré <funman@videolan.org> 1212745127 +0200
Message:

stream_Read() : makes the buffer mandatory

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/input/stream.c

    r5df2e97 r0bcda15  
    805805 
    806806        /* Copy data */ 
    807         if( p_data ) 
    808         { 
    809             memcpy( p_data, 
     807        memcpy( p_data, 
    810808                    &p_sys->block.p_current->p_buffer[p_sys->block.i_offset], 
    811809                    i_copy ); 
    812             p_data += i_copy; 
    813         } 
     810        p_data += i_copy; 
    814811        i_data += i_copy; 
    815812 
     
    11491146        /* Copy data */ 
    11501147        /* msg_Dbg( s, "AStreamReadStream: copy %d", i_copy ); */ 
    1151         if( p_data ) 
    1152         { 
    1153             memcpy( p_data, &tk->p_buffer[i_off], i_copy ); 
    1154             p_data += i_copy; 
    1155         } 
     1148        memcpy( p_data, &tk->p_buffer[i_off], i_copy ); 
     1149        p_data += i_copy; 
    11561150        i_data += i_copy; 
    11571151        p_sys->stream.i_offset += i_copy; 
     
    20752069int stream_Read( stream_t *s, void *p_read, int i_read ) 
    20762070{ 
     2071    assert( s ); 
     2072    assert( p_read ); 
    20772073    return s->pf_read( s, p_read, i_read ); 
    20782074}