1
mirror of https://github.com/mpv-player/mpv synced 2025-01-05 03:06:28 +01:00

Add some const/static qualifiers as appropriate

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25523 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2007-12-24 16:27:52 +00:00
parent f9dd4f27ba
commit 951bc25530
3 changed files with 6 additions and 6 deletions

View File

@ -1305,7 +1305,7 @@ static int mp_property_sub(m_option_t * prop, int action, void *arg,
}
#ifdef HAVE_OGGVORBIS
if (mpctx->demuxer->type == DEMUXER_TYPE_OGG && d_sub && dvdsub_id >= 0) {
char *lang = demux_ogg_sub_lang(mpctx->demuxer, dvdsub_id);
const char *lang = demux_ogg_sub_lang(mpctx->demuxer, dvdsub_id);
if (!lang)
lang = MSGTR_Unknown;
snprintf(*(char **) arg, 63, "(%d) %s", dvdsub_id, lang);

View File

@ -326,9 +326,9 @@ static unsigned char* demux_ogg_read_packet(ogg_stream_t* os,ogg_packet* pack,vo
}
// check if clang has substring from comma separated langlist
static int demux_ogg_check_lang(const char *clang, char *langlist)
static int demux_ogg_check_lang(const char *clang, const char *langlist)
{
char *c;
const char *c;
if (!langlist || !*langlist)
return 0;
@ -352,7 +352,7 @@ static void demux_ogg_check_comments(demuxer_t *d, ogg_stream_t *os, int id, vor
char **cmt = vc->user_comments;
int index, i;
ogg_demuxer_t *ogg_d = d->priv;
struct table {
static const struct table {
const char *ogg;
const char *mp;
} table[] = {
@ -649,7 +649,7 @@ static int demux_ogg_sub_reverse_id(demuxer_t *demuxer, int id) {
* \param demuxer The demuxer about whose subtitles we are inquiring.
* \param index The subtitle number.
*/
char *demux_ogg_sub_lang(demuxer_t *demuxer, int index) {
const char *demux_ogg_sub_lang(demuxer_t *demuxer, int index) {
ogg_demuxer_t *ogg_d = demuxer->priv;
return (index < 0) ? NULL : (index >= ogg_d->n_text) ? NULL : ogg_d->text_langs[index];
}

View File

@ -370,7 +370,7 @@ int demux_control(demuxer_t *demuxer, int cmd, void *arg);
/* Found in demux_ogg.c */
int demux_ogg_num_subs(demuxer_t *demuxer);
int demux_ogg_sub_id(demuxer_t *demuxer, int index);
char *demux_ogg_sub_lang(demuxer_t *demuxer, int index);
const char *demux_ogg_sub_lang(demuxer_t *demuxer, int index);
#endif
extern int demuxer_get_current_time(demuxer_t *demuxer);