[MPlayer-cvslog] r25701 - in trunk: libao2/ao_dxr2.c libmpdemux/mpeg_packetizer.c libmpdemux/mpeg_packetizer.h libvo/vo_dxr2.c
reimar
subversion at mplayerhq.hu
Sat Jan 12 17:05:04 CET 2008
Author: reimar
Date: Sat Jan 12 17:05:04 2008
New Revision: 25701
Log:
Write functions used by send_mpeg_*_packet may _not_ modify data
Modified:
trunk/libao2/ao_dxr2.c
trunk/libmpdemux/mpeg_packetizer.c
trunk/libmpdemux/mpeg_packetizer.h
trunk/libvo/vo_dxr2.c
Modified: trunk/libao2/ao_dxr2.c
==============================================================================
--- trunk/libao2/ao_dxr2.c (original)
+++ trunk/libao2/ao_dxr2.c Sat Jan 12 17:05:04 2008
@@ -157,7 +157,7 @@ static int get_space(void){
static void dxr2_send_lpcm_packet(unsigned char* data,int len,int id,unsigned int timestamp,int freq_id)
{
- extern int write_dxr2(unsigned char *data, int len);
+ extern int write_dxr2(const unsigned char *data, int len);
if(dxr2_fd < 0) {
mp_msg(MSGT_AO,MSGL_ERR,"DXR2 fd is not valid\n");
@@ -176,7 +176,7 @@ static void dxr2_send_lpcm_packet(unsign
// it should round it down to outburst*n
// return: number of bytes played
static int play(void* data,int len,int flags){
- extern int write_dxr2(unsigned char *data, int len);
+ extern int write_dxr2(const unsigned char *data, int len);
// MPEG and AC3 don't work :-(
if(ao_data.format==AF_FORMAT_MPEG2)
Modified: trunk/libmpdemux/mpeg_packetizer.c
==============================================================================
--- trunk/libmpdemux/mpeg_packetizer.c (original)
+++ trunk/libmpdemux/mpeg_packetizer.c Sat Jan 12 17:05:04 2008
@@ -48,7 +48,7 @@ static const unsigned char ps1_header[]
static int
send_mpeg_pes_packet_ll(unsigned char *data, int len, int id, uint64_t pts,
int type, unsigned char *header, int header_len,
- int align4, int my_write (unsigned char *data, int len))
+ int align4, int my_write (const unsigned char *data, int len))
{
int ptslen = (pts ? 5 : 0);
int n = 0;
@@ -139,7 +139,7 @@ send_mpeg_pes_packet_ll(unsigned char *d
int
send_mpeg_pes_packet (unsigned char *data, int len, int id, uint64_t pts,
- int type, int my_write (unsigned char *data, int len))
+ int type, int my_write (const unsigned char *data, int len))
{
return send_mpeg_pes_packet_ll(data, len, id, pts, type, NULL, 0, 0, my_write);
}
@@ -148,7 +148,7 @@ send_mpeg_pes_packet (unsigned char *dat
/* Send MPEG <type> PS packet */
int
send_mpeg_ps_packet(unsigned char *data, int len, int id, uint64_t pts, int type,
- int my_write (unsigned char *data, int len))
+ int my_write (const unsigned char *data, int len))
{
if(type == 2)
my_write (ps2_header, sizeof (ps2_header));
@@ -161,7 +161,7 @@ send_mpeg_ps_packet(unsigned char *data,
int
send_mpeg_lpcm_packet(unsigned char* data, int len,
int id, uint64_t pts, int freq_id,
- int my_write (unsigned char *data, int len))
+ int my_write (const unsigned char *data, int len))
{
unsigned char header[7] = {0xA0, 0x07, 0x00, 0x04, 0x0C, 1 | (freq_id << 4), 0x80};
return send_mpeg_pes_packet_ll(data, len, 0xBD, pts, 2, header, sizeof(header), 1, my_write);
Modified: trunk/libmpdemux/mpeg_packetizer.h
==============================================================================
--- trunk/libmpdemux/mpeg_packetizer.h (original)
+++ trunk/libmpdemux/mpeg_packetizer.h Sat Jan 12 17:05:04 2008
@@ -27,15 +27,15 @@
/* Send MPEG <type> PES packet */
int send_mpeg_pes_packet (unsigned char *data, int len, int id, uint64_t pts,
- int type, int my_write (unsigned char *data, int len));
+ int type, int my_write (const unsigned char *data, int len));
/* Send MPEG <type> PS packet */
int send_mpeg_ps_packet (unsigned char *data, int len, int id, uint64_t pts,
- int type,int my_write (unsigned char *data, int len));
+ int type,int my_write (const unsigned char *data, int len));
/* Send MPEG 2 LPCM packet */
int send_mpeg_lpcm_packet (unsigned char *data, int len,
int id, uint64_t pts, int freq_id,
- int my_write (unsigned char *data, int len));
+ int my_write (const unsigned char *data, int len));
#endif /* MPEG_PACKETIZER_H */
Modified: trunk/libvo/vo_dxr2.c
==============================================================================
--- trunk/libvo/vo_dxr2.c (original)
+++ trunk/libvo/vo_dxr2.c Sat Jan 12 17:05:04 2008
@@ -153,7 +153,7 @@ static char *ucodesearchpath[] = {
static unsigned char dxr2buf[BUF_SIZE];
static unsigned int dxr2bufpos = 0;
-int write_dxr2(unsigned char *data, int len)
+int write_dxr2(const unsigned char *data, int len)
{
int w = 0;
More information about the MPlayer-cvslog
mailing list