[MPlayer-cvslog] r25523 - in trunk: command.c libmpdemux/demux_ogg.c libmpdemux/demuxer.h
reimar
subversion at mplayerhq.hu
Mon Dec 24 17:27:52 CET 2007
Author: reimar
Date: Mon Dec 24 17:27:52 2007
New Revision: 25523
Log:
Add some const/static qualifiers as appropriate
Modified:
trunk/command.c
trunk/libmpdemux/demux_ogg.c
trunk/libmpdemux/demuxer.h
Modified: trunk/command.c
==============================================================================
--- trunk/command.c (original)
+++ trunk/command.c Mon Dec 24 17:27:52 2007
@@ -1305,7 +1305,7 @@ static int mp_property_sub(m_option_t *
}
#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);
Modified: trunk/libmpdemux/demux_ogg.c
==============================================================================
--- trunk/libmpdemux/demux_ogg.c (original)
+++ trunk/libmpdemux/demux_ogg.c Mon Dec 24 17:27:52 2007
@@ -326,9 +326,9 @@ static unsigned char* demux_ogg_read_pac
}
// 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(dem
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(demu
* \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];
}
Modified: trunk/libmpdemux/demuxer.h
==============================================================================
--- trunk/libmpdemux/demuxer.h (original)
+++ trunk/libmpdemux/demuxer.h Mon Dec 24 17:27:52 2007
@@ -370,7 +370,7 @@ int demux_control(demuxer_t *demuxer, in
/* 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);
More information about the MPlayer-cvslog
mailing list