[FFmpeg-cvslog] lavf: use av_fifo_freep

Lukasz Marek git at videolan.org
Thu May 8 04:11:33 CEST 2014


ffmpeg | branch: master | Lukasz Marek <lukasz.m.luki2 at gmail.com> | Tue May  6 21:48:14 2014 +0200| [ce1eefe691ef52539adb8f4991092f181a17370d] | committer: Lukasz Marek

lavf: use av_fifo_freep

Signed-off-by: Lukasz Marek <lukasz.m.luki2 at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ce1eefe691ef52539adb8f4991092f181a17370d
---

 libavformat/audiointerleave.c |    2 +-
 libavformat/dvenc.c           |    4 ++--
 libavformat/mpegenc.c         |    2 +-
 libavformat/swfenc.c          |    3 +--
 libavformat/udp.c             |    4 ++--
 5 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/libavformat/audiointerleave.c b/libavformat/audiointerleave.c
index 2aa95f3..6d24ff5 100644
--- a/libavformat/audiointerleave.c
+++ b/libavformat/audiointerleave.c
@@ -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);
     }
 }
 
diff --git a/libavformat/dvenc.c b/libavformat/dvenc.c
index 43f65c3..defcf2a 100644
--- a/libavformat/dvenc.c
+++ b/libavformat/dvenc.c
@@ -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)
diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
index 1e60c51..5521f48 100644
--- a/libavformat/mpegenc.c
+++ b/libavformat/mpegenc.c
@@ -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;
 }
diff --git a/libavformat/swfenc.c b/libavformat/swfenc.c
index 8d9cf0c..402f21e 100644
--- a/libavformat/swfenc.c
+++ b/libavformat/swfenc.c
@@ -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);
         }
     }
 
diff --git a/libavformat/udp.c b/libavformat/udp.c
index d9a18d5..65c7a55 100644
--- a/libavformat/udp.c
+++ b/libavformat/udp.c
@@ -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;
 }
 



More information about the ffmpeg-cvslog mailing list