Loading lib_util/mime_io.c +1 −1 Original line number Diff line number Diff line Loading @@ -322,7 +322,7 @@ static bool readLong( { char buffer[4] = { 0 }; if ( fread( buffer, 1, 4, file ) != 1U ) if ( fread( buffer, 1, 4, file ) != 4U ) { return false; } Loading lib_util/rtpdump.c +13 −9 Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ static unsigned char *parseByte( unsigned char *buffer, unsigned char *value ) static int readLong( FILE *file, unsigned int *value ) { char buffer[4] = { 0 }; if ( fread( buffer, 1, 4, file ) != 1U ) if ( fread( buffer, 1, 4, file ) != 4U ) { return -1; } Loading @@ -96,7 +96,7 @@ static int readLong( FILE *file, unsigned int *value ) static int readShort( FILE *file, unsigned short *value ) { char buffer[2] = { 0 }; if ( fread( buffer, 1, 2, file ) != 1U ) if ( fread( buffer, 1, 2, file ) != 2U ) { return -1; } Loading Loading @@ -198,7 +198,10 @@ static int readHeader( struct RTPDUMP *hRTPDUMP ) static int writeHeader( struct RTPDUMP *hRTPDUMP ) { /* write rtpdump header */ fprintf( hRTPDUMP->file, "#!rtpplay%s %s/%d\n", "1.0", "127.0.0.1", 5000 ); { hRTPDUMP->source = 0x7F000001u; /* 127.0.0.1 */ hRTPDUMP->port = 5000u; fprintf( hRTPDUMP->file, "#!rtpplay%s %s/%d\n", "1.0", "127.0.0.1", hRTPDUMP->port ); if ( !writeLong( hRTPDUMP->file, hRTPDUMP->startSeconds ) && !writeLong( hRTPDUMP->file, hRTPDUMP->startMicroSeconds ) && !writeLong( hRTPDUMP->file, hRTPDUMP->source ) && Loading @@ -207,6 +210,7 @@ static int writeHeader( struct RTPDUMP *hRTPDUMP ) { return 0; } } return -1; } Loading Loading
lib_util/mime_io.c +1 −1 Original line number Diff line number Diff line Loading @@ -322,7 +322,7 @@ static bool readLong( { char buffer[4] = { 0 }; if ( fread( buffer, 1, 4, file ) != 1U ) if ( fread( buffer, 1, 4, file ) != 4U ) { return false; } Loading
lib_util/rtpdump.c +13 −9 Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ static unsigned char *parseByte( unsigned char *buffer, unsigned char *value ) static int readLong( FILE *file, unsigned int *value ) { char buffer[4] = { 0 }; if ( fread( buffer, 1, 4, file ) != 1U ) if ( fread( buffer, 1, 4, file ) != 4U ) { return -1; } Loading @@ -96,7 +96,7 @@ static int readLong( FILE *file, unsigned int *value ) static int readShort( FILE *file, unsigned short *value ) { char buffer[2] = { 0 }; if ( fread( buffer, 1, 2, file ) != 1U ) if ( fread( buffer, 1, 2, file ) != 2U ) { return -1; } Loading Loading @@ -198,7 +198,10 @@ static int readHeader( struct RTPDUMP *hRTPDUMP ) static int writeHeader( struct RTPDUMP *hRTPDUMP ) { /* write rtpdump header */ fprintf( hRTPDUMP->file, "#!rtpplay%s %s/%d\n", "1.0", "127.0.0.1", 5000 ); { hRTPDUMP->source = 0x7F000001u; /* 127.0.0.1 */ hRTPDUMP->port = 5000u; fprintf( hRTPDUMP->file, "#!rtpplay%s %s/%d\n", "1.0", "127.0.0.1", hRTPDUMP->port ); if ( !writeLong( hRTPDUMP->file, hRTPDUMP->startSeconds ) && !writeLong( hRTPDUMP->file, hRTPDUMP->startMicroSeconds ) && !writeLong( hRTPDUMP->file, hRTPDUMP->source ) && Loading @@ -207,6 +210,7 @@ static int writeHeader( struct RTPDUMP *hRTPDUMP ) { return 0; } } return -1; } Loading