[FFmpeg-soc] [soc]: r5283 - in concat/libavformat: avplaylist.c avplaylist.h playlist.c playlist.h utils.c.diff

gkovacs subversion at mplayerhq.hu
Wed Aug 26 03:42:05 CEST 2009


Author: gkovacs
Date: Wed Aug 26 03:42:05 2009
New Revision: 5283

Log:
move playlist_alloc_concat_formatcontext out of public header

Modified:
   concat/libavformat/avplaylist.c
   concat/libavformat/avplaylist.h
   concat/libavformat/playlist.c
   concat/libavformat/playlist.h
   concat/libavformat/utils.c.diff

Modified: concat/libavformat/avplaylist.c
==============================================================================
--- concat/libavformat/avplaylist.c	Wed Aug 26 03:35:00 2009	(r5282)
+++ concat/libavformat/avplaylist.c	Wed Aug 26 03:42:05 2009	(r5283)
@@ -46,21 +46,6 @@ AVPlaylistContext *av_playlist_get_conte
         return NULL;
 }
 
-AVFormatContext *av_playlist_alloc_concat_formatcontext(void)
-{
-    AVFormatContext *ic;
-    AVPlaylistContext *ctx = av_mallocz(sizeof(*ctx));
-    if (!ctx) {
-        av_log(NULL, AV_LOG_ERROR, "failed to allocate AVPlaylistContext in av_playlist_alloc_playlist_formatcontext\n");
-        return NULL;
-    }
-    ic = avformat_alloc_context();
-    ic->iformat = ff_concat_alloc_demuxer();
-    ic->priv_data = ctx;
-    ctx->master_formatcontext = ic;
-    return ic;
-}
-
 int av_playlist_split_encodedstring(const char *s,
                                     const char sep,
                                     char ***flist_ptr,

Modified: concat/libavformat/avplaylist.h
==============================================================================
--- concat/libavformat/avplaylist.h	Wed Aug 26 03:35:00 2009	(r5282)
+++ concat/libavformat/avplaylist.h	Wed Aug 26 03:42:05 2009	(r5283)
@@ -49,11 +49,6 @@ typedef struct AVPlaylistContext {
     AVFormatContext *master_formatcontext; /**< Parent AVFormatContext of which priv_data is this playlist. NULL if playlist is used standalone. */
 } AVPlaylistContext;
 
-/** @brief Allocates a new AVFormatContext for a concat-type demuxer.
- *  @return Returns NULL if failed, or AVFormatContext if succeeded.
- */
-AVFormatContext *av_playlist_alloc_concat_formatcontext(void);
-
 /** @brief Returns AVPlaylistContext continaed within a concat-type demuxer.
  *  @param ic AVFormatContext of the concat-type demuxer, which contains the AVPlaylistContext.
  *  @return Returns NULL if failed (not concat-type demuxer or Playlist not yet allocated), or AVPlaylistContext if succeeded.

Modified: concat/libavformat/playlist.c
==============================================================================
--- concat/libavformat/playlist.c	Wed Aug 26 03:35:00 2009	(r5282)
+++ concat/libavformat/playlist.c	Wed Aug 26 03:42:05 2009	(r5283)
@@ -55,6 +55,21 @@ AVFormatContext *ff_playlist_alloc_forma
     return ic;
 }
 
+AVFormatContext *ff_playlist_alloc_concat_formatcontext(void)
+{
+    AVFormatContext *ic;
+    AVPlaylistContext *ctx = av_mallocz(sizeof(*ctx));
+    if (!ctx) {
+        av_log(NULL, AV_LOG_ERROR, "failed to allocate AVPlaylistContext in ff_playlist_alloc_concat_formatcontext\n");
+        return NULL;
+    }
+    ic = avformat_alloc_context();
+    ic->iformat = ff_concat_alloc_demuxer();
+    ic->priv_data = ctx;
+    ctx->master_formatcontext = ic;
+    return ic;
+}
+
 int ff_playlist_populate_context(AVPlaylistContext *ctx, int pe_curidx)
 {
     AVFormatContext **formatcontext_list_tmp = av_realloc(ctx->formatcontext_list, sizeof(*(ctx->formatcontext_list)) * (pe_curidx+2));

Modified: concat/libavformat/playlist.h
==============================================================================
--- concat/libavformat/playlist.h	Wed Aug 26 03:35:00 2009	(r5282)
+++ concat/libavformat/playlist.h	Wed Aug 26 03:42:05 2009	(r5283)
@@ -39,6 +39,11 @@
  */
 AVFormatContext *ff_playlist_alloc_formatcontext(char *filename);
 
+/** @brief Allocates a new AVFormatContext for a concat-type demuxer.
+ *  @return Returns NULL if failed, or AVFormatContext if succeeded.
+ */
+AVFormatContext *ff_playlist_alloc_concat_formatcontext(void);
+
 /** @brief Opens the playlist element with the specified index from the AVPlaylistContext.
  *  @param ctx AVPlaylistContext containing the desired playlist element.
  *  @param pe_curidx Index of the playlist element to be opened.

Modified: concat/libavformat/utils.c.diff
==============================================================================
--- concat/libavformat/utils.c.diff	Wed Aug 26 03:35:00 2009	(r5282)
+++ concat/libavformat/utils.c.diff	Wed Aug 26 03:42:05 2009	(r5283)
@@ -1,5 +1,5 @@
 diff --git a/libavformat/utils.c b/libavformat/utils.c
-index 4cec286..71475e5 100644
+index 4cec286..67186ac 100644
 --- a/libavformat/utils.c
 +++ b/libavformat/utils.c
 @@ -27,6 +27,8 @@
@@ -27,7 +27,7 @@ index 4cec286..71475e5 100644
  
 +    av_playlist_split_encodedstring(filename, ',', &flist, &flist_len);
 +    if (flist && flist_len > 1) {
-+        AVFormatContext *ic = av_playlist_alloc_concat_formatcontext();
++        AVFormatContext *ic = ff_playlist_alloc_concat_formatcontext();
 +        if (ic) {
 +            AVPlaylistContext *playlist_ctx = av_playlist_get_context(ic);
 +            if (playlist_ctx) {


More information about the FFmpeg-soc mailing list