[FFmpeg-soc] [soc]: r4884 - in concat/libavformat: playlist.c playlist.h
gkovacs
subversion at mplayerhq.hu
Sat Aug 1 05:11:41 CEST 2009
Author: gkovacs
Date: Sat Aug 1 05:11:41 2009
New Revision: 4884
Log:
passing unmodified parameters as const
Modified:
concat/libavformat/playlist.c
concat/libavformat/playlist.h
Modified: concat/libavformat/playlist.c
==============================================================================
--- concat/libavformat/playlist.c Sat Aug 1 05:07:02 2009 (r4883)
+++ concat/libavformat/playlist.c Sat Aug 1 05:11:41 2009 (r4884)
@@ -83,7 +83,7 @@ void ff_playlist_set_context(AVFormatCon
ic->priv_data = ctx;
}
-void ff_playlist_split_encodedstring(char *s, char sep, char ***flist_ptr, int *len_ptr)
+void ff_playlist_split_encodedstring(const char *s, const char sep, char ***flist_ptr, int *len_ptr)
{
char c, *ts, **flist;
int i, len, buflen, *sepidx;
@@ -109,7 +109,7 @@ void ff_playlist_split_encodedstring(cha
av_free(sepidx);
}
-PlaylistContext *ff_playlist_from_encodedstring(char *s, char sep)
+PlaylistContext *ff_playlist_from_encodedstring(const char *s, const char sep)
{
PlaylistContext *ctx;
char **flist;
@@ -127,7 +127,7 @@ PlaylistContext *ff_playlist_from_encode
return ctx;
}
-void ff_playlist_add_path(PlaylistContext *ctx, char *itempath)
+void ff_playlist_add_path(PlaylistContext *ctx, const char *itempath)
{
ctx->flist = av_realloc(ctx->flist, sizeof(*(ctx->flist)) * (++ctx->pelist_size+1));
ctx->flist[ctx->pelist_size] = NULL;
@@ -136,7 +136,7 @@ void ff_playlist_add_path(PlaylistContex
ctx->durations[ctx->pelist_size] = NULL;
}
-void ff_playlist_relative_paths(char **flist, int len, const char *workingdir)
+void ff_playlist_relative_paths(char **flist, const int len, const char *workingdir)
{
int i;
for (i = 0; i < len; ++i) { // determine if relative paths
@@ -153,7 +153,7 @@ void ff_playlist_relative_paths(char **f
}
}
-int64_t ff_playlist_time_offset(int64_t *durations, int pe_curidx)
+int64_t ff_playlist_time_offset(int64_t *durations, const int pe_curidx)
{
int i;
int64_t total = 0;
Modified: concat/libavformat/playlist.h
==============================================================================
--- concat/libavformat/playlist.h Sat Aug 1 05:07:02 2009 (r4883)
+++ concat/libavformat/playlist.h Sat Aug 1 05:11:41 2009 (r4884)
@@ -89,7 +89,7 @@ void ff_playlist_set_context(AVFormatCon
* @param len Number of paths in flist.
* @param workingdir Path that strings in flist are relative to.
*/
-void ff_playlist_relative_paths(char **flist, int len, const char *workingdir);
+void ff_playlist_relative_paths(char **flist, const int len, const char *workingdir);
/** @fn void ff_playlist_split_encodedstring(char *s, char sep, char ***flist_ptr, int *len_ptr)
* @brief Splits a character-delimited string into a list of strings.
@@ -98,7 +98,7 @@ void ff_playlist_relative_paths(char **f
* @param flist_ptr Pointer to string list which will be allocated by function.
* @param len_ptr Number of segments the string was split into.
*/
-void ff_playlist_split_encodedstring(char *s, char sep, char ***flist_ptr, int *len_ptr);
+void ff_playlist_split_encodedstring(const char *s, const char sep, char ***flist_ptr, int *len_ptr);
/** @fn PlaylistContext *ff_playlist_from_encodedstring(char *s, char sep)
* @brief Allocates and returns a PlaylistContext with playlist elements specified by a character-delimited string.
@@ -106,14 +106,14 @@ void ff_playlist_split_encodedstring(cha
* @param sep The delimiter character (',').
* @return Returns the allocated PlaylistContext.
*/
-PlaylistContext *ff_playlist_from_encodedstring(char *s, char sep);
+PlaylistContext *ff_playlist_from_encodedstring(const char *s, const char sep);
/** @fn void ff_playlist_add_path(PlaylistContext *ctx, char *itempath)
* @brief Adds PlayElem for item located at specified path to a PlaylistContext.
* @param ctx Pre-allocated PlaylistContext to add elements to.
* @param itempath Absolute path to item for which to add a playlist element.
*/
-void ff_playlist_add_path(PlaylistContext *ctx, char *itempath);
+void ff_playlist_add_path(PlaylistContext *ctx, const char *itempath);
/** @fn int64_t ff_playlist_time_offset(int64_t *durations, int pe_curidx)
* @brief Calculates the total time offset of an element in a PlaylistContext in AV_TIME_BASE units.
@@ -121,7 +121,7 @@ void ff_playlist_add_path(PlaylistContex
* @param pe_curidx Index of the playlist element for which to calculate the time offset.
* @return Returns the time offset in AV_TIME_BASE units.
*/
-int64_t ff_playlist_time_offset(int64_t *durations, int pe_curidx);
+int64_t ff_playlist_time_offset(int64_t *durations, const int pe_curidx);
int ff_playlist_stream_index_from_time(PlaylistContext *ctx, int64_t pts);
More information about the FFmpeg-soc
mailing list