# HG changeset patch # User diego # Date 1266445704 0 # Node ID 928359c13d938048d46e6f331034228894315cd0 # Parent 02420b32391b1f4f13b22945cea0c63ac600cede Add separate header for aac_parse_frame(); avoids forward declarations. diff -r 02420b32391b -r 928359c13d93 libmpdemux/aac_hdr.c --- a/libmpdemux/aac_hdr.c Wed Feb 17 22:22:51 2010 +0000 +++ b/libmpdemux/aac_hdr.c Wed Feb 17 22:28:24 2010 +0000 @@ -19,6 +19,7 @@ */ #include +#include "aac_hdr.h" /// \param srate (out) sample rate /// \param num (out) number of audio frames in this ADTS frame diff -r 02420b32391b -r 928359c13d93 libmpdemux/aac_hdr.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libmpdemux/aac_hdr.h Wed Feb 17 22:28:24 2010 +0000 @@ -0,0 +1,26 @@ +/* + * This file is part of MPlayer. + * + * MPlayer is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * MPlayer is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with MPlayer; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef MPLAYER_AAC_HDR_H +#define MPLAYER_AAC_HDR_H + +#include + +int aac_parse_frame(uint8_t *buf, int *srate, int *num); + +#endif /* MPLAYER_AAC_HDR_H */ diff -r 02420b32391b -r 928359c13d93 libmpdemux/demux_aac.c --- a/libmpdemux/demux_aac.c Wed Feb 17 22:22:51 2010 +0000 +++ b/libmpdemux/demux_aac.c Wed Feb 17 22:28:24 2010 +0000 @@ -28,7 +28,7 @@ #include "demuxer.h" #include "parse_es.h" #include "stheader.h" - +#include "aac_hdr.h" #include "ms_hdr.h" typedef struct { @@ -39,12 +39,6 @@ int bitrate; /// bitrate computed as size/time } aac_priv_t; -/// \param srate (out) sample rate -/// \param num (out) number of audio frames in this ADTS frame -/// \return size of the ADTS frame in bytes -/// aac_parse_frames needs a buffer at least 8 bytes long -int aac_parse_frame(uint8_t *buf, int *srate, int *num); - static int demux_aac_init(demuxer_t *demuxer) { aac_priv_t *priv; diff -r 02420b32391b -r 928359c13d93 libmpdemux/muxer_mpeg.c --- a/libmpdemux/muxer_mpeg.c Wed Feb 17 22:22:51 2010 +0000 +++ b/libmpdemux/muxer_mpeg.c Wed Feb 17 22:28:24 2010 +0000 @@ -34,6 +34,7 @@ #include "demuxer.h" #include "stheader.h" #include "m_option.h" +#include "aac_hdr.h" #include "mpeg_hdr.h" #include "mp3_hdr.h" #include "liba52/a52.h" @@ -2067,8 +2068,6 @@ return layer; //actual layer with the highest score } -int aac_parse_frame(uint8_t *buf, int *srate, int *num); - static int parse_audio(muxer_stream_t *s, int finalize, unsigned int *nf, double *timer, double delay, int drop) { int i, j, len, chans, srate, spf, layer, dummy, tot, num, frm_idx;