summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-12-24 16:27:52 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-12-24 16:27:52 +0000
commit951bc25530f9efa8288bc2e9fdf329c6d1d6c0d6 (patch)
tree893e345a0d2b441397fb7d6fb976bb3c3c0bd12a
parentf9dd4f27ba103d909a729b6fba2b51394279b6a3 (diff)
downloadmpv-951bc25530f9efa8288bc2e9fdf329c6d1d6c0d6.tar.bz2
mpv-951bc25530f9efa8288bc2e9fdf329c6d1d6c0d6.tar.xz
Add some const/static qualifiers as appropriate
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25523 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--command.c2
-rw-r--r--libmpdemux/demux_ogg.c8
-rw-r--r--libmpdemux/demuxer.h2
3 files changed, 6 insertions, 6 deletions
diff --git a/command.c b/command.c
index bb3f198c68..1726c4555f 100644
--- a/command.c
+++ b/command.c
@@ -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);
diff --git a/libmpdemux/demux_ogg.c b/libmpdemux/demux_ogg.c
index 8816fce038..691d913775 100644
--- a/libmpdemux/demux_ogg.c
+++ b/libmpdemux/demux_ogg.c
@@ -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];
}
diff --git a/libmpdemux/demuxer.h b/libmpdemux/demuxer.h
index ef761b37e4..e5a7049dee 100644
--- a/libmpdemux/demuxer.h
+++ b/libmpdemux/demuxer.h
@@ -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);