[FFmpeg-soc] [soc]: r5307 - concat/libavformat/avplaylist.c

gkovacs subversion at mplayerhq.hu
Wed Aug 26 10:39:09 CEST 2009


Author: gkovacs
Date: Wed Aug 26 10:39:09 2009
New Revision: 5307

Log:
re-order functions in avplaylist.c to match header declarations

Modified:
   concat/libavformat/avplaylist.c

Modified: concat/libavformat/avplaylist.c
==============================================================================
--- concat/libavformat/avplaylist.c	Wed Aug 26 10:33:50 2009	(r5306)
+++ concat/libavformat/avplaylist.c	Wed Aug 26 10:39:09 2009	(r5307)
@@ -86,6 +86,31 @@ int av_playlist_split_encodedstring(cons
     av_free(sepidx);
 }
 
+void av_playlist_relative_paths(char **flist,
+                                int len,
+                                const char *workingdir)
+{
+    int i;
+    for (i = 0; i < len; ++i) { // determine if relative paths
+        char *full_file_path;
+        int workingdir_len, filename_len;
+        workingdir_len = strlen(workingdir);
+        filename_len = strlen(flist[i]);
+        full_file_path = av_malloc(workingdir_len + filename_len + 2);
+        av_strlcpy(full_file_path, workingdir, workingdir_len + 1);
+        full_file_path[workingdir_len] = '/';
+        full_file_path[workingdir_len + 1] = 0;
+        av_strlcat(full_file_path, flist[i], workingdir_len + filename_len + 2);
+        if (url_exist(full_file_path))
+            flist[i] = full_file_path;
+    }
+}
+
+int av_playlist_add_item(AVPlaylistContext *ctx, const char *itempath)
+{
+    return av_playlist_insert_item(ctx, itempath, ctx->pelist_size);
+}
+
 int av_playlist_insert_item(AVPlaylistContext *ctx, const char *itempath, int pos)
 {
     int i;
@@ -133,11 +158,6 @@ int av_playlist_insert_item(AVPlaylistCo
     return 0;
 }
 
-int av_playlist_add_item(AVPlaylistContext *ctx, const char *itempath)
-{
-    return av_playlist_insert_item(ctx, itempath, ctx->pelist_size);
-}
-
 int av_playlist_remove_item(AVPlaylistContext *ctx, int pos)
 {
     int i;
@@ -202,26 +222,6 @@ int av_playlist_remove_item(AVPlaylistCo
     return 0;
 }
 
-void av_playlist_relative_paths(char **flist,
-                                int len,
-                                const char *workingdir)
-{
-    int i;
-    for (i = 0; i < len; ++i) { // determine if relative paths
-        char *full_file_path;
-        int workingdir_len, filename_len;
-        workingdir_len = strlen(workingdir);
-        filename_len = strlen(flist[i]);
-        full_file_path = av_malloc(workingdir_len + filename_len + 2);
-        av_strlcpy(full_file_path, workingdir, workingdir_len + 1);
-        full_file_path[workingdir_len] = '/';
-        full_file_path[workingdir_len + 1] = 0;
-        av_strlcat(full_file_path, flist[i], workingdir_len + filename_len + 2);
-        if (url_exist(full_file_path))
-            flist[i] = full_file_path;
-    }
-}
-
 int av_playlist_close(AVPlaylistContext *ctx)
 {
     int err;


More information about the FFmpeg-soc mailing list