[FFmpeg-cvslog] avformat/rtpdec_vp9: Use ffio_free_dyn_buf()

Michael Niedermayer git at videolan.org
Fri Feb 27 13:57:02 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Feb 27 13:18:48 2015 +0100| [629a03a9128bd2e51286258e12183b1d06f509a7] | committer: Michael Niedermayer

avformat/rtpdec_vp9: Use ffio_free_dyn_buf()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/rtpdec_vp9.c |   11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/libavformat/rtpdec_vp9.c b/libavformat/rtpdec_vp9.c
index b8041a9..b5e4e98 100644
--- a/libavformat/rtpdec_vp9.c
+++ b/libavformat/rtpdec_vp9.c
@@ -22,6 +22,7 @@
 
 #include "libavcodec/bytestream.h"
 
+#include "avio_internal.h"
 #include "rtpdec_formats.h"
 
 #define RTP_VP9_DESC_REQUIRED_SIZE 1
@@ -31,14 +32,6 @@ struct PayloadContext {
     uint32_t     timestamp;
 };
 
-static void vp9_free_dyn_buffer(AVIOContext **dyn_buf)
-{
-    uint8_t *ptr_dyn_buffer;
-    avio_close_dyn_buf(*dyn_buf, &ptr_dyn_buffer);
-    av_free(ptr_dyn_buffer);
-    *dyn_buf = NULL;
-}
-
 static av_cold int vp9_init(AVFormatContext *ctx, int st_index,
                              PayloadContext *data)
 {
@@ -68,7 +61,7 @@ static int vp9_handle_packet(AVFormatContext *ctx, PayloadContext *rtp_vp9_ctx,
 
     /* drop data of previous packets in case of non-continuous (lossy) packet stream */
     if (rtp_vp9_ctx->buf && rtp_vp9_ctx->timestamp != *timestamp) {
-        vp9_free_dyn_buffer(&rtp_vp9_ctx->buf);
+        ffio_free_dyn_buf(&rtp_vp9_ctx->buf);
     }
 
     /* sanity check for size of input packet: 1 byte payload at least */



More information about the ffmpeg-cvslog mailing list