lavf: use av_fifo_freep
authorLukasz Marek <lukasz.m.luki2@gmail.com>
Tue, 6 May 2014 19:48:14 +0000 (21:48 +0200)
committerLukasz Marek <lukasz.m.luki2@gmail.com>
Wed, 7 May 2014 21:39:47 +0000 (23:39 +0200)
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
libavformat/audiointerleave.c
libavformat/dvenc.c
libavformat/mpegenc.c
libavformat/swfenc.c
libavformat/udp.c

index 2aa95f3dc6a14cdbd6a292fc00c6483cf3c007bc..6d24ff5c7fe3e21664016c183a39006df28cc4c9 100644 (file)
@@ -34,7 +34,7 @@ void ff_audio_interleave_close(AVFormatContext *s)
         AudioInterleaveContext *aic = st->priv_data;
 
         if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO)
-            av_fifo_free(aic->fifo);
+            av_fifo_freep(&aic->fifo);
     }
 }
 
index 43f65c37b9cccd0027d7ffc30866ac9350d9c39d..defcf2a16e3c1ce8385d77c9131eb31f411b6a16 100644 (file)
@@ -334,7 +334,7 @@ static DVMuxContext* dv_init_mux(AVFormatContext* s)
         if (c->ast[i] && !(c->audio_data[i]=av_fifo_alloc(100*MAX_AUDIO_FRAME_SIZE))) {
             while (i > 0) {
                 i--;
-                av_fifo_free(c->audio_data[i]);
+                av_fifo_freep(&c->audio_data[i]);
             }
             goto bail_out;
         }
@@ -350,7 +350,7 @@ static void dv_delete_mux(DVMuxContext *c)
 {
     int i;
     for (i=0; i < c->n_ast; i++)
-        av_fifo_free(c->audio_data[i]);
+        av_fifo_freep(&c->audio_data[i]);
 }
 
 static int dv_write_header(AVFormatContext *s)
index 1e60c51fdd85dccb956a50fc15a10c3c24fb2da7..5521f48cee4891e08fb1444964e4144833fac154 100644 (file)
@@ -1159,7 +1159,7 @@ static int mpeg_mux_end(AVFormatContext *ctx)
         stream = ctx->streams[i]->priv_data;
 
         assert(av_fifo_size(stream->fifo) == 0);
-        av_fifo_free(stream->fifo);
+        av_fifo_freep(&stream->fifo);
     }
     return 0;
 }
index 8d9cf0c246cdcb51ae339a006b7d6533fa1306a4..402f21ef40aacd27659df1bec070e9a3994c2430 100644 (file)
@@ -490,8 +490,7 @@ static int swf_write_trailer(AVFormatContext *s)
         if (enc->codec_type == AVMEDIA_TYPE_VIDEO)
             video_enc = enc;
         else {
-            av_fifo_free(swf->audio_fifo);
-            swf->audio_fifo = NULL;
+            av_fifo_freep(&swf->audio_fifo);
         }
     }
 
index d9a18d5739832f1fa9cda0a8e77d808aa6a50632..65c7a5549d7537760785431e761f9bd012e065d8 100644 (file)
@@ -761,7 +761,7 @@ static int udp_open(URLContext *h, const char *uri, int flags)
  fail:
     if (udp_fd >= 0)
         closesocket(udp_fd);
-    av_fifo_free(s->fifo);
+    av_fifo_freep(&s->fifo);
     for (i = 0; i < num_include_sources; i++)
         av_freep(&include_sources[i]);
     for (i = 0; i < num_exclude_sources; i++)
@@ -867,7 +867,7 @@ static int udp_close(URLContext *h)
         pthread_cond_destroy(&s->cond);
     }
 #endif
-    av_fifo_free(s->fifo);
+    av_fifo_freep(&s->fifo);
     return 0;
 }