mirror of
https://github.com/mpv-player/mpv
synced 2025-04-10 11:41:37 +00:00
Fix compilation of C++ source files (partly reverts r30744).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30755 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
50fed7d1f9
commit
3a43f13fce
@ -261,7 +261,7 @@ typedef struct {
|
|||||||
} demux_program_t;
|
} demux_program_t;
|
||||||
|
|
||||||
static inline demux_packet_t* new_demux_packet(int len){
|
static inline demux_packet_t* new_demux_packet(int len){
|
||||||
demux_packet_t* dp = malloc(sizeof(demux_packet_t));
|
demux_packet_t* dp=(demux_packet_t*)malloc(sizeof(demux_packet_t));
|
||||||
dp->len=len;
|
dp->len=len;
|
||||||
dp->next=NULL;
|
dp->next=NULL;
|
||||||
dp->pts=MP_NOPTS_VALUE;
|
dp->pts=MP_NOPTS_VALUE;
|
||||||
@ -272,7 +272,7 @@ static inline demux_packet_t* new_demux_packet(int len){
|
|||||||
dp->refcount=1;
|
dp->refcount=1;
|
||||||
dp->master=NULL;
|
dp->master=NULL;
|
||||||
dp->buffer=NULL;
|
dp->buffer=NULL;
|
||||||
if (len > 0 && (dp->buffer = malloc(len + MP_INPUT_BUFFER_PADDING_SIZE)))
|
if (len > 0 && (dp->buffer = (unsigned char *)malloc(len + MP_INPUT_BUFFER_PADDING_SIZE)))
|
||||||
memset(dp->buffer + len, 0, 8);
|
memset(dp->buffer + len, 0, 8);
|
||||||
else
|
else
|
||||||
dp->len = 0;
|
dp->len = 0;
|
||||||
@ -283,7 +283,7 @@ static inline void resize_demux_packet(demux_packet_t* dp, int len)
|
|||||||
{
|
{
|
||||||
if(len > 0)
|
if(len > 0)
|
||||||
{
|
{
|
||||||
dp->buffer = realloc(dp->buffer, len + 8);
|
dp->buffer=(unsigned char *)realloc(dp->buffer,len+8);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -298,7 +298,7 @@ static inline void resize_demux_packet(demux_packet_t* dp, int len)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline demux_packet_t* clone_demux_packet(demux_packet_t* pack){
|
static inline demux_packet_t* clone_demux_packet(demux_packet_t* pack){
|
||||||
demux_packet_t* dp = malloc(sizeof(demux_packet_t));
|
demux_packet_t* dp=(demux_packet_t*)malloc(sizeof(demux_packet_t));
|
||||||
while(pack->master) pack=pack->master; // find the master
|
while(pack->master) pack=pack->master; // find the master
|
||||||
memcpy(dp,pack,sizeof(demux_packet_t));
|
memcpy(dp,pack,sizeof(demux_packet_t));
|
||||||
dp->next=NULL;
|
dp->next=NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user