diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-03-10 02:14:30 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-03-10 02:35:02 +0200 |
commit | bc1d0ca37d9bdfd69a945043650e0246ffeb5f94 (patch) | |
tree | 8269c9cbc1df72afb5715b77669698a0781f6250 /libmpdemux | |
parent | f7cc4152f7c55808c5dd6bbd49c216c9345eb686 (diff) | |
parent | e9a5e7f667d1b0c0dec0053ad9ec6f7bc3162b60 (diff) | |
download | mpv-bc1d0ca37d9bdfd69a945043650e0246ffeb5f94.tar.bz2 mpv-bc1d0ca37d9bdfd69a945043650e0246ffeb5f94.tar.xz |
Merge svn changes up to r30798
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/demux_rtp.h | 6 | ||||
-rw-r--r-- | libmpdemux/demux_rtp_internal.h | 5 | ||||
-rw-r--r-- | libmpdemux/demuxer.h | 8 | ||||
-rw-r--r-- | libmpdemux/mp3_hdr.c | 12 |
4 files changed, 4 insertions, 27 deletions
diff --git a/libmpdemux/demux_rtp.h b/libmpdemux/demux_rtp.h index 0e2c665ae8..6d3462d856 100644 --- a/libmpdemux/demux_rtp.h +++ b/libmpdemux/demux_rtp.h @@ -21,13 +21,7 @@ #include <stdlib.h> #include <stdio.h> - -#ifndef STREAM_H -#include "stream/stream.h" -#endif -#ifndef DEMUXER_H #include "demuxer.h" -#endif // Open a RTP demuxer (which was initiated either from a SDP file, // or from a RTSP URL): diff --git a/libmpdemux/demux_rtp_internal.h b/libmpdemux/demux_rtp_internal.h index 77f0364918..fb8f582b53 100644 --- a/libmpdemux/demux_rtp_internal.h +++ b/libmpdemux/demux_rtp_internal.h @@ -22,12 +22,7 @@ #include <stdlib.h> extern "C" { -#ifndef STREAM_H -#include "stream/stream.h" -#endif -#ifndef DEMUXER_H #include "demuxer.h" -#endif #ifdef CONFIG_LIBAVCODEC #include "libavcodec/avcodec.h" #endif diff --git a/libmpdemux/demuxer.h b/libmpdemux/demuxer.h index e529c2535b..1f16ea4eda 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 = malloc(sizeof(demux_packet_t)); + demux_packet_t* dp=(demux_packet_t*)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 = 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); 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 = realloc(dp->buffer, len + 8); + dp->buffer=(unsigned char *)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 = 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 memcpy(dp,pack,sizeof(demux_packet_t)); dp->next=NULL; diff --git a/libmpdemux/mp3_hdr.c b/libmpdemux/mp3_hdr.c index 6177030316..a4834f4f81 100644 --- a/libmpdemux/mp3_hdr.c +++ b/libmpdemux/mp3_hdr.c @@ -38,18 +38,6 @@ static long freqs[9] = { 44100, 48000, 32000, // MPEG 1.0 22050, 24000, 16000, // MPEG 2.0 11025, 12000, 8000}; // MPEG 2.5 -static int mp_mp3_get_lsf(unsigned char* hbuf){ - unsigned long newhead = - hbuf[0] << 24 | - hbuf[1] << 16 | - hbuf[2] << 8 | - hbuf[3]; - if( newhead & ((long)1<<20) ) { - return (newhead & ((long)1<<19)) ? 0x0 : 0x1; - } - return 1; -} - /* * return frame size or -1 (bad frame) */ |