changeset 30570:98dc6ae7ede2

libmpdemux: Mark functions not used outside of their files as static.
author diego
date Wed, 17 Feb 2010 22:01:35 +0000
parents 98b6d4c82ab6
children 7031b2cf61ca
files libmpdemux/aviheader.c libmpdemux/demux_avi.c libmpdemux/demux_avs.c libmpdemux/demux_gif.c libmpdemux/demux_mpg.c libmpdemux/demux_ogg.c libmpdemux/demux_pva.c libmpdemux/demuxer.c libmpdemux/parse_mp4.c
diffstat 9 files changed, 32 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/aviheader.c	Wed Feb 17 21:49:17 2010 +0000
+++ b/libmpdemux/aviheader.c	Wed Feb 17 22:01:35 2010 +0000
@@ -59,7 +59,8 @@
     return 0;
 }
 
-int avi_idx_cmp(const void *elem1,const void *elem2) {
+static int avi_idx_cmp(const void *elem1, const void *elem2)
+{
   register off_t a = AVI_IDX_OFFSET((AVIINDEXENTRY *)elem1);
   register off_t b = AVI_IDX_OFFSET((AVIINDEXENTRY *)elem2);
   return (a > b) - (b > a);
--- a/libmpdemux/demux_avi.c	Wed Feb 17 21:49:17 2010 +0000
+++ b/libmpdemux/demux_avi.c	Wed Feb 17 22:01:35 2010 +0000
@@ -43,7 +43,9 @@
 int pts_from_bps=1;
 
 // Select ds from ID
-demux_stream_t* demux_avi_select_stream(demuxer_t *demux,unsigned int id){
+static demux_stream_t *demux_avi_select_stream(demuxer_t *demux,
+                                               unsigned int id)
+{
   int stream_id=avi_stream_id(id);
 
 
@@ -306,7 +308,8 @@
 // return value:
 //     0 = EOF or no stream found
 //     1 = successfully read a packet
-int demux_avi_fill_buffer_ni(demuxer_t *demux,demux_stream_t* ds){
+static int demux_avi_fill_buffer_ni(demuxer_t *demux, demux_stream_t *ds)
+{
 avi_priv_t *priv=demux->priv;
 unsigned int id=0;
 unsigned int len;
@@ -374,7 +377,8 @@
 // return value:
 //     0 = EOF or no stream found
 //     1 = successfully read a packet
-int demux_avi_fill_buffer_nini(demuxer_t *demux,demux_stream_t* ds){
+static int demux_avi_fill_buffer_nini(demuxer_t *demux, demux_stream_t *ds)
+{
 avi_priv_t *priv=demux->priv;
 unsigned int id=0;
 unsigned int len;
@@ -586,7 +590,9 @@
 }
 
 
-void demux_seek_avi(demuxer_t *demuxer,float rel_seek_secs,float audio_delay,int flags){
+static void demux_seek_avi(demuxer_t *demuxer, float rel_seek_secs,
+                           float audio_delay, int flags)
+{
     avi_priv_t *priv=demuxer->priv;
     demux_stream_t *d_audio=demuxer->audio;
     demux_stream_t *d_video=demuxer->video;
@@ -759,7 +765,8 @@
 }
 
 
-void demux_close_avi(demuxer_t *demuxer) {
+static void demux_close_avi(demuxer_t *demuxer)
+{
   avi_priv_t* priv=demuxer->priv;
 
   if(!priv)
--- a/libmpdemux/demux_avs.c	Wed Feb 17 21:49:17 2010 +0000
+++ b/libmpdemux/demux_avs.c	Wed Feb 17 22:01:35 2010 +0000
@@ -85,7 +85,7 @@
     imp_avs_get_audio avs_get_audio;
 } AVS_T;
 
-AVS_T *initAVS(const char *filename)
+static AVS_T *initAVS(const char *filename)
 {
     AVS_T *AVS = malloc (sizeof(AVS_T));
     AVS_Value arg0 = avs_new_value_string(filename);
--- a/libmpdemux/demux_gif.c	Wed Feb 17 21:49:17 2010 +0000
+++ b/libmpdemux/demux_gif.c	Wed Feb 17 22:01:35 2010 +0000
@@ -47,7 +47,8 @@
 
 #ifndef CONFIG_GIF_TVT_HACK
 // not supported by certain versions of the library
-int my_read_gif(GifFileType *gif, uint8_t *buf, int len) {
+static int my_read_gif(GifFileType *gif, uint8_t *buf, int len)
+{
   return stream_read(gif->UserData, buf, len);
 }
 #endif
--- a/libmpdemux/demux_mpg.c	Wed Feb 17 21:49:17 2010 +0000
+++ b/libmpdemux/demux_mpg.c	Wed Feb 17 22:01:35 2010 +0000
@@ -814,7 +814,8 @@
   return 1;
 }
 
-int demux_mpg_fill_buffer(demuxer_t *demux, demux_stream_t *ds){
+static int demux_mpg_fill_buffer(demuxer_t *demux, demux_stream_t *ds)
+{
 unsigned int head=0;
 int skipped=0;
 int max_packs=256; // 512kbyte
@@ -901,7 +902,9 @@
 
 void skip_audio_frame(sh_audio_t *sh_audio);
 
-void demux_seek_mpg(demuxer_t *demuxer,float rel_seek_secs,float audio_delay, int flags){
+static void demux_seek_mpg(demuxer_t *demuxer, float rel_seek_secs,
+                           float audio_delay, int flags)
+{
     demux_stream_t *d_audio=demuxer->audio;
     demux_stream_t *d_video=demuxer->video;
     sh_audio_t *sh_audio=d_audio->sh;
@@ -1007,7 +1010,8 @@
     }
 }
 
-int demux_mpg_control(demuxer_t *demuxer,int cmd, void *arg){
+static int demux_mpg_control(demuxer_t *demuxer, int cmd, void *arg)
+{
     mpg_demuxer_t *mpg_d=(mpg_demuxer_t*)demuxer->priv;
 
     switch(cmd) {
--- a/libmpdemux/demux_ogg.c	Wed Feb 17 21:49:17 2010 +0000
+++ b/libmpdemux/demux_ogg.c	Wed Feb 17 22:01:35 2010 +0000
@@ -177,7 +177,8 @@
 static subtitle ogg_sub;
 //FILE* subout;
 
-void demux_ogg_add_sub (ogg_stream_t* os,ogg_packet* pack) {
+static void demux_ogg_add_sub(ogg_stream_t *os, ogg_packet *pack)
+{
   int lcv;
   char *packet = pack->packet;
 
@@ -513,7 +514,8 @@
 
 /// if -forceidx build a table of all syncpoints to make seeking easier
 /// otherwise try to get at least the final_granulepos
-void demux_ogg_scan_stream(demuxer_t* demuxer) {
+static void demux_ogg_scan_stream(demuxer_t *demuxer)
+{
   ogg_demuxer_t* ogg_d = demuxer->priv;
   stream_t *s = demuxer->stream;
   ogg_sync_state* sync = &ogg_d->sync;
--- a/libmpdemux/demux_pva.c	Wed Feb 17 21:49:17 2010 +0000
+++ b/libmpdemux/demux_pva.c	Wed Feb 17 22:01:35 2010 +0000
@@ -73,7 +73,7 @@
 
 
 
-int pva_sync(demuxer_t * demuxer)
+static int pva_sync(demuxer_t * demuxer)
 {
 	uint8_t buffer[5]={0,0,0,0,0};
 	int count;
--- a/libmpdemux/demuxer.c	Wed Feb 17 21:49:17 2010 +0000
+++ b/libmpdemux/demuxer.c	Wed Feb 17 22:01:35 2010 +0000
@@ -277,7 +277,7 @@
     return demuxer->s_streams[id];
 }
 
-void free_sh_sub(sh_sub_t *sh)
+static void free_sh_sub(sh_sub_t *sh)
 {
     mp_msg(MSGT_DEMUXER, MSGL_DBG2, "DEMUXER: freeing sh_sub at %p\n", sh);
     free(sh->extradata);
--- a/libmpdemux/parse_mp4.c	Wed Feb 17 21:49:17 2010 +0000
+++ b/libmpdemux/parse_mp4.c	Wed Feb 17 22:01:35 2010 +0000
@@ -33,7 +33,8 @@
 #define MP4_DL MSGL_V
 #define freereturn(a,b) free(a); return b
 
-int mp4_read_descr_len(stream_t *s) {
+static int mp4_read_descr_len(stream_t *s)
+{
   uint8_t b;
   uint8_t numBytes = 0;
   uint32_t length = 0;