mirror of https://github.com/mpv-player/mpv
Mark some functions static
These functions aren't used outside their file and have no prototype in any header. Based on a forgotten patch from 2006 by Stefan Huehner, (stefan huehner org).
This commit is contained in:
parent
d9aa368a6d
commit
9e7dfe3fa3
|
@ -42,7 +42,7 @@ static int odml_get_vstream_id(int id, unsigned char res[])
|
|||
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);
|
||||
|
|
|
@ -24,7 +24,9 @@ extern const demuxer_desc_t demuxer_desc_avi_nini;
|
|||
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);
|
||||
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#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;
|
||||
|
|
|
@ -63,13 +63,13 @@ static int min_fill=0;
|
|||
|
||||
int cache_fill_status=0;
|
||||
|
||||
void cache_stats(cache_vars_t* s){
|
||||
static void cache_stats(cache_vars_t* s){
|
||||
int newb=s->max_filepos-s->read_filepos; // new bytes in the buffer
|
||||
mp_msg(MSGT_CACHE,MSGL_INFO,"0x%06X [0x%06X] 0x%06X ",(int)s->min_filepos,(int)s->read_filepos,(int)s->max_filepos);
|
||||
mp_msg(MSGT_CACHE,MSGL_INFO,"%3d %% (%3d%%)\n",100*newb/s->buffer_size,100*min_fill/s->buffer_size);
|
||||
}
|
||||
|
||||
int cache_read(cache_vars_t* s,unsigned char* buf,int size){
|
||||
static int cache_read(cache_vars_t* s,unsigned char* buf,int size){
|
||||
int total=0;
|
||||
while(size>0){
|
||||
int pos,newb,len;
|
||||
|
@ -115,7 +115,7 @@ int cache_read(cache_vars_t* s,unsigned char* buf,int size){
|
|||
return total;
|
||||
}
|
||||
|
||||
int cache_fill(cache_vars_t* s){
|
||||
static int cache_fill(cache_vars_t* s){
|
||||
int back,back2,newb,space,len,pos;
|
||||
off_t read=s->read_filepos;
|
||||
|
||||
|
@ -191,7 +191,7 @@ int cache_fill(cache_vars_t* s){
|
|||
|
||||
}
|
||||
|
||||
cache_vars_t* cache_init(int size,int sector){
|
||||
static cache_vars_t* cache_init(int size,int sector){
|
||||
int num;
|
||||
#if !defined(WIN32) && !defined(__OS2__)
|
||||
cache_vars_t* s=shmem_alloc(sizeof(cache_vars_t));
|
||||
|
|
|
@ -121,7 +121,7 @@ static const stream_info_t* const auto_open_streams[] = {
|
|||
NULL
|
||||
};
|
||||
|
||||
stream_t* open_stream_plugin(const stream_info_t* sinfo,char* filename,int mode,
|
||||
static stream_t* open_stream_plugin(const stream_info_t* sinfo,char* filename,int mode,
|
||||
char** options, int* file_format, int* ret,
|
||||
char** redirected_url) {
|
||||
void* arg = NULL;
|
||||
|
|
Loading…
Reference in New Issue