Changeset 7076fe3a4144be3b546eceefbd2578d1cca2521d

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

[b1285bea5deab1b29307256057f661b573d03186]

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

Revert "stream_Read() : makes the buffer mandatory"

This reverts commit 0bcda15e362b5e00fd4b6f458206ac52035b217d.

Files:

Legend:

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

    r0bcda15 r7076fe3  
    805805 
    806806        /* Copy data */ 
    807         memcpy( p_data, 
     807        if( p_data ) 
     808        { 
     809            memcpy( p_data, 
    808810                    &p_sys->block.p_current->p_buffer[p_sys->block.i_offset], 
    809811                    i_copy ); 
    810         p_data += i_copy; 
     812            p_data += i_copy; 
     813        } 
    811814        i_data += i_copy; 
    812815 
     
    11461149        /* Copy data */ 
    11471150        /* msg_Dbg( s, "AStreamReadStream: copy %d", i_copy ); */ 
    1148         memcpy( p_data, &tk->p_buffer[i_off], i_copy ); 
    1149         p_data += i_copy; 
     1151        if( p_data ) 
     1152        { 
     1153            memcpy( p_data, &tk->p_buffer[i_off], i_copy ); 
     1154            p_data += i_copy; 
     1155        } 
    11501156        i_data += i_copy; 
    11511157        p_sys->stream.i_offset += i_copy; 
     
    20692075int stream_Read( stream_t *s, void *p_read, int i_read ) 
    20702076{ 
    2071     assert( s ); 
    2072     assert( p_read ); 
    20732077    return s->pf_read( s, p_read, i_read ); 
    20742078}