From 3a43f13fcec1d804a04687cfd9d5030f80bbf575 Mon Sep 17 00:00:00 2001 From: cehoyos Date: Sat, 27 Feb 2010 11:32:48 +0000 Subject: Fix compilation of C++ source files (partly reverts r30744). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30755 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demuxer.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libmpdemux') diff --git a/libmpdemux/demuxer.h b/libmpdemux/demuxer.h index 4be7e5a5a0..699e5a56b9 100644 --- a/libmpdemux/demuxer.h +++ b/libmpdemux/demuxer.h @@ -261,7 +261,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; @@ -272,7 +272,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; @@ -283,7 +283,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 { @@ -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){ - 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; -- cgit v1.2.3 From 664e5bb9b8519f0474c40db472c06a7c5d5f4245 Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 27 Feb 2010 12:45:12 +0000 Subject: Remove unnecessary stream.h #includes. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30758 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_rtp.h | 3 --- libmpdemux/demux_rtp_internal.h | 3 --- 2 files changed, 6 deletions(-) (limited to 'libmpdemux') diff --git a/libmpdemux/demux_rtp.h b/libmpdemux/demux_rtp.h index 0e2c665ae8..7273afc3be 100644 --- a/libmpdemux/demux_rtp.h +++ b/libmpdemux/demux_rtp.h @@ -22,9 +22,6 @@ #include #include -#ifndef STREAM_H -#include "stream/stream.h" -#endif #ifndef DEMUXER_H #include "demuxer.h" #endif diff --git a/libmpdemux/demux_rtp_internal.h b/libmpdemux/demux_rtp_internal.h index 77f0364918..88b1f7e98b 100644 --- a/libmpdemux/demux_rtp_internal.h +++ b/libmpdemux/demux_rtp_internal.h @@ -22,9 +22,6 @@ #include extern "C" { -#ifndef STREAM_H -#include "stream/stream.h" -#endif #ifndef DEMUXER_H #include "demuxer.h" #endif -- cgit v1.2.3 From 01c5a73c5359fb71c1d394194969b1eeb55575b0 Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 27 Feb 2010 12:48:11 +0000 Subject: Remove pointless #ifdef checks for DEMUXER_H, which is never set. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30759 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_rtp.h | 3 --- libmpdemux/demux_rtp_internal.h | 2 -- 2 files changed, 5 deletions(-) (limited to 'libmpdemux') diff --git a/libmpdemux/demux_rtp.h b/libmpdemux/demux_rtp.h index 7273afc3be..6d3462d856 100644 --- a/libmpdemux/demux_rtp.h +++ b/libmpdemux/demux_rtp.h @@ -21,10 +21,7 @@ #include #include - -#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 88b1f7e98b..fb8f582b53 100644 --- a/libmpdemux/demux_rtp_internal.h +++ b/libmpdemux/demux_rtp_internal.h @@ -22,9 +22,7 @@ #include extern "C" { -#ifndef DEMUXER_H #include "demuxer.h" -#endif #ifdef CONFIG_LIBAVCODEC #include "libavcodec/avcodec.h" #endif -- cgit v1.2.3 From c44915814cc211b5527dadc6f56956ec4df68968 Mon Sep 17 00:00:00 2001 From: cehoyos Date: Sat, 27 Feb 2010 21:29:06 +0000 Subject: Remove unused static function mp_mp3_get_lsf(). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30774 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/mp3_hdr.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'libmpdemux') diff --git a/libmpdemux/mp3_hdr.c b/libmpdemux/mp3_hdr.c index 1e70c17976..fc4bf6d7f7 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) */ -- cgit v1.2.3