diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-03-10 01:46:46 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-03-10 01:50:55 +0200 |
commit | e74708f6194ef0af2bdf37e857ed232027fa46ba (patch) | |
tree | f7b53476abeb1cc8ccbe1c49113e9722c51b7800 /libmpdemux/demuxer.h | |
parent | 2ad00b5319603b22f9b0858bb14d016f673157cb (diff) | |
parent | cb8796857c8bd851e3b97d729af149e3f003b851 (diff) | |
download | mpv-e74708f6194ef0af2bdf37e857ed232027fa46ba.tar.bz2 mpv-e74708f6194ef0af2bdf37e857ed232027fa46ba.tar.xz |
Merge svn changes up to r30748
Diffstat (limited to 'libmpdemux/demuxer.h')
-rw-r--r-- | libmpdemux/demuxer.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libmpdemux/demuxer.h b/libmpdemux/demuxer.h index 1f16ea4eda..e529c2535b 100644 --- a/libmpdemux/demuxer.h +++ b/libmpdemux/demuxer.h @@ -279,7 +279,7 @@ typedef struct { } demux_program_t; static inline demux_packet_t* new_demux_packet(int len){ - demux_packet_t* dp=(demux_packet_t*)malloc(sizeof(demux_packet_t)); + demux_packet_t* dp = malloc(sizeof(demux_packet_t)); dp->len=len; dp->next=NULL; dp->pts=MP_NOPTS_VALUE; @@ -290,7 +290,7 @@ static inline demux_packet_t* new_demux_packet(int len){ dp->refcount=1; dp->master=NULL; dp->buffer=NULL; - if (len > 0 && (dp->buffer = (unsigned char *)malloc(len + MP_INPUT_BUFFER_PADDING_SIZE))) + if (len > 0 && (dp->buffer = malloc(len + MP_INPUT_BUFFER_PADDING_SIZE))) memset(dp->buffer + len, 0, 8); else dp->len = 0; @@ -301,7 +301,7 @@ static inline void resize_demux_packet(demux_packet_t* dp, int len) { if(len > 0) { - dp->buffer=(unsigned char *)realloc(dp->buffer,len+8); + dp->buffer = realloc(dp->buffer, len + 8); } else { @@ -316,7 +316,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){ - demux_packet_t* dp=(demux_packet_t*)malloc(sizeof(demux_packet_t)); + demux_packet_t* dp = malloc(sizeof(demux_packet_t)); while(pack->master) pack=pack->master; // find the master memcpy(dp,pack,sizeof(demux_packet_t)); dp->next=NULL; |