[MPlayer-cvslog] r31957 - in trunk/stream: stream_dvd.c stream_dvd.h stream_dvdnav.c stream_dvdnav.h

reimar subversion at mplayerhq.hu
Wed Aug 11 22:44:29 CEST 2010


Author: reimar
Date: Wed Aug 11 22:44:29 2010
New Revision: 31957

Log:
Add const qualifiers to function string arguments as appropriate.

Modified:
   trunk/stream/stream_dvd.c
   trunk/stream/stream_dvd.h
   trunk/stream/stream_dvdnav.c
   trunk/stream/stream_dvdnav.h

Modified: trunk/stream/stream_dvd.c
==============================================================================
--- trunk/stream/stream_dvd.c	Wed Aug 11 03:14:37 2010	(r31956)
+++ trunk/stream/stream_dvd.c	Wed Aug 11 22:44:29 2010	(r31957)
@@ -162,7 +162,7 @@ int dvd_lang_from_aid(stream_t *stream, 
   return 0;
 }
 
-int dvd_aid_from_lang(stream_t *stream, unsigned char* lang) {
+int dvd_aid_from_lang(stream_t *stream, const unsigned char* lang) {
   dvd_priv_t *d=stream->priv;
   int code,i;
   if(lang) {
@@ -206,7 +206,7 @@ int dvd_lang_from_sid(stream_t *stream, 
   return 0;
 }
 
-int dvd_sid_from_lang(stream_t *stream, unsigned char* lang) {
+int dvd_sid_from_lang(stream_t *stream, const unsigned char* lang) {
   dvd_priv_t *d=stream->priv;
   int code,i;
   while(lang && strlen(lang)>=2) {

Modified: trunk/stream/stream_dvd.h
==============================================================================
--- trunk/stream/stream_dvd.h	Wed Aug 11 03:14:37 2010	(r31956)
+++ trunk/stream/stream_dvd.h	Wed Aug 11 22:44:29 2010	(r31957)
@@ -59,8 +59,8 @@ typedef struct {
 int dvd_number_of_subs(stream_t *stream);
 int dvd_lang_from_aid(stream_t *stream, int id);
 int dvd_lang_from_sid(stream_t *stream, int id);
-int dvd_aid_from_lang(stream_t *stream, unsigned char* lang);
-int dvd_sid_from_lang(stream_t *stream, unsigned char* lang);
+int dvd_aid_from_lang(stream_t *stream, const unsigned char* lang);
+int dvd_sid_from_lang(stream_t *stream, const unsigned char* lang);
 int dvd_chapter_from_cell(dvd_priv_t *dvd,int title,int cell);
 int dvd_parse_chapter_range(const m_option_t *conf, const char *range);
 

Modified: trunk/stream/stream_dvdnav.c
==============================================================================
--- trunk/stream/stream_dvdnav.c	Wed Aug 11 03:14:37 2010	(r31956)
+++ trunk/stream/stream_dvdnav.c	Wed Aug 11 22:44:29 2010	(r31957)
@@ -733,7 +733,7 @@ static int mp_dvdnav_get_aid_from_format
  * \param lang: 2-characters language code[s], eventually separated by spaces of commas
  * \return -1 on error, current subtitle id if successful
  */
-int mp_dvdnav_aid_from_lang(stream_t *stream, unsigned char *language) {
+int mp_dvdnav_aid_from_lang(stream_t *stream, const unsigned char *language) {
   dvdnav_priv_t * priv = stream->priv;
   int k;
   uint8_t lg;
@@ -785,7 +785,7 @@ int mp_dvdnav_lang_from_aid(stream_t *st
  * \param lang: 2-characters language code[s], eventually separated by spaces of commas
  * \return -1 on error, current subtitle id if successful
  */
-int mp_dvdnav_sid_from_lang(stream_t *stream, unsigned char *language) {
+int mp_dvdnav_sid_from_lang(stream_t *stream, const unsigned char *language) {
   dvdnav_priv_t * priv = stream->priv;
   uint8_t lg, k;
   uint16_t lang, lcode;

Modified: trunk/stream/stream_dvdnav.h
==============================================================================
--- trunk/stream/stream_dvdnav.h	Wed Aug 11 03:14:37 2010	(r31956)
+++ trunk/stream/stream_dvdnav.h	Wed Aug 11 22:44:29 2010	(r31957)
@@ -30,9 +30,9 @@ typedef struct {
 
 int mp_dvdnav_number_of_subs(stream_t *stream);
 int mp_dvdnav_aid_from_audio_num(stream_t *stream, int audio_num);
-int mp_dvdnav_aid_from_lang(stream_t *stream, unsigned char *language);
+int mp_dvdnav_aid_from_lang(stream_t *stream, const unsigned char *language);
 int mp_dvdnav_lang_from_aid(stream_t *stream, int id, unsigned char *buf);
-int mp_dvdnav_sid_from_lang(stream_t *stream, unsigned char *language);
+int mp_dvdnav_sid_from_lang(stream_t *stream, const unsigned char *language);
 int mp_dvdnav_lang_from_sid(stream_t *stream, int sid, unsigned char *buf);
 void mp_dvdnav_handle_input(stream_t *stream, int cmd, int *button);
 void mp_dvdnav_update_mouse_pos(stream_t *stream, int32_t x, int32_t y, int* button);


More information about the MPlayer-cvslog mailing list