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

gkovacs subversion at mplayerhq.hu
Thu Sep 3 21:44:42 CEST 2009


Author: gkovacs
Date: Thu Sep  3 21:44:42 2009
New Revision: 5380

Log:
pass AVPlaylistContext rather than NULL to av_log

Modified:
   concat/libavformat/avplaylist.c

Modified: concat/libavformat/avplaylist.c
==============================================================================
--- concat/libavformat/avplaylist.c	Thu Sep  3 21:39:02 2009	(r5379)
+++ concat/libavformat/avplaylist.c	Thu Sep  3 21:44:42 2009	(r5380)
@@ -52,7 +52,7 @@ int av_playlist_insert_item(AVPlaylistCo
     ++ctx->pelist_size;
     flist_tmp = av_realloc(ctx->flist, sizeof(*(ctx->flist)) * ctx->pelist_size);
     if (!flist_tmp) {
-        av_log(NULL, AV_LOG_ERROR,
+        av_log(ctx, AV_LOG_ERROR,
                "av_realloc error for flist in av_playlist_insert_item\n");
         return AVERROR_NOMEM;
     } else
@@ -60,7 +60,7 @@ int av_playlist_insert_item(AVPlaylistCo
     durations_tmp = av_realloc(ctx->durations,
                                sizeof(*(ctx->durations)) * ctx->pelist_size);
     if (!durations_tmp) {
-        av_log(NULL, AV_LOG_ERROR,
+        av_log(ctx, AV_LOG_ERROR,
                "av_realloc error for durations in av_playlist_insert_item\n");
         return AVERROR_NOMEM;
     } else
@@ -68,7 +68,7 @@ int av_playlist_insert_item(AVPlaylistCo
     nb_streams_list_tmp = av_realloc(ctx->nb_streams_list,
                                      sizeof(*(ctx->nb_streams_list)) * ctx->pelist_size);
     if (!nb_streams_list_tmp) {
-        av_log(NULL, AV_LOG_ERROR,
+        av_log(ctx, AV_LOG_ERROR,
                "av_realloc error for nb_streams_list in av_playlist_insert_item\n");
         return AVERROR_NOMEM;
     } else
@@ -76,14 +76,14 @@ int av_playlist_insert_item(AVPlaylistCo
     formatcontext_list_tmp = av_realloc(ctx->formatcontext_list,
                                         sizeof(*(ctx->formatcontext_list)) * ctx->pelist_size);
     if (!formatcontext_list_tmp) {
-        av_log(NULL, AV_LOG_ERROR,
+        av_log(ctx, AV_LOG_ERROR,
                "av_realloc error for formatcontext_list in av_playlist_insert_item\n");
         return AVERROR_NOMEM;
     } else
         ctx->formatcontext_list = formatcontext_list_tmp;
     ic = ff_playlist_alloc_formatcontext(itempath);
     if (!ic) {
-        av_log(NULL, AV_LOG_ERROR,
+        av_log(ctx, AV_LOG_ERROR,
                "failed to allocate and open %s in av_playlist_insert_item\n",
                itempath);
         return AVERROR_NOMEM;
@@ -108,7 +108,7 @@ int av_playlist_insert_item(AVPlaylistCo
     itempath_len = strlen(itempath);
     ctx->flist[pos] = av_malloc(itempath_len + 1);
     if (!ctx->flist[pos]) {
-        av_log(NULL, AV_LOG_ERROR,
+        av_log(ctx, AV_LOG_ERROR,
                "av_malloc error in av_playlist_insert_item\n");
         return AVERROR_NOMEM;
     }
@@ -125,7 +125,7 @@ int av_playlist_insert_playlist(AVPlayli
     for (i = 0; i < insert_ctx->pelist_size; ++i) {
         err = av_playlist_insert_item(ctx, insert_ctx->flist[i], pos + i);
         if (err) {
-            av_log(NULL, AV_LOG_ERROR,
+            av_log(ctx, AV_LOG_ERROR,
                    "failed to insert item %d to new position %d in av_playlist_insert_playlist\n",
                    i, pos + i);
             return err;
@@ -142,7 +142,7 @@ int av_playlist_remove_item(AVPlaylistCo
     AVFormatContext **formatcontext_list_tmp;
     char **flist_tmp;
     if (pos >= ctx->pelist_size || !ctx->flist || !ctx->durations || !ctx->nb_streams_list) {
-        av_log(NULL, AV_LOG_ERROR,
+        av_log(ctx, AV_LOG_ERROR,
                "failed to remove item %d which is not present in playlist\n",
                pos);
         return AVERROR_INVALIDDATA;
@@ -153,7 +153,7 @@ int av_playlist_remove_item(AVPlaylistCo
         ctx->flist[i] = ctx->flist[i + 1];
     flist_tmp = av_realloc(ctx->flist, sizeof(*(ctx->flist)) * ctx->pelist_size);
     if (!flist_tmp) {
-        av_log(NULL, AV_LOG_ERROR,
+        av_log(ctx, AV_LOG_ERROR,
                "av_realloc error for flist in av_playlist_remove_item\n");
         return AVERROR_NOMEM;
     } else
@@ -167,7 +167,7 @@ int av_playlist_remove_item(AVPlaylistCo
     durations_tmp = av_realloc(ctx->durations,
                                sizeof(*(ctx->durations)) * ctx->pelist_size);
     if (!durations_tmp) {
-        av_log(NULL, AV_LOG_ERROR,
+        av_log(ctx, AV_LOG_ERROR,
                "av_realloc error for durations in av_playlist_remove_item\n");
         return AVERROR_NOMEM;
     } else
@@ -181,7 +181,7 @@ int av_playlist_remove_item(AVPlaylistCo
     nb_streams_list_tmp = av_realloc(ctx->nb_streams_list,
                                      sizeof(*(ctx->nb_streams_list)) * ctx->pelist_size);
     if (!nb_streams_list_tmp) {
-        av_log(NULL, AV_LOG_ERROR,
+        av_log(ctx, AV_LOG_ERROR,
                "av_realloc error for nb_stream_list in av_playlist_remove_item\n");
         return AVERROR_NOMEM;
     } else
@@ -197,7 +197,7 @@ int av_playlist_remove_item(AVPlaylistCo
     formatcontext_list_tmp = av_realloc(ctx->formatcontext_list,
                                         sizeof(*(ctx->formatcontext_list)) * ctx->pelist_size);
     if (!formatcontext_list_tmp) {
-        av_log(NULL, AV_LOG_ERROR,
+        av_log(ctx, AV_LOG_ERROR,
                "av_realloc error for formatcontext_list in av_playlist_remove_item\n");
         return AVERROR_NOMEM;
     } else
@@ -214,7 +214,7 @@ int av_playlist_close(AVPlaylistContext 
     while (ctx->pelist_size > 0) {
         err = av_playlist_remove_item(ctx, ctx->pelist_size-1);
         if (err) {
-            av_log(NULL, AV_LOG_ERROR,
+            av_log(ctx, AV_LOG_ERROR,
                    "failed to remove item %d from playlist",
                    ctx->pelist_size-1);
             return err;


More information about the FFmpeg-soc mailing list