summaryrefslogtreecommitdiff
path: root/libavformat/rtpenc_mpegts.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2015-02-24 14:07:54 +0200
committerMartin Storsjö <martin@martin.st>2015-02-24 23:07:47 +0200
commit8e32b1f0963d01d4f5d4803eb721f162e0d58d9a (patch)
tree94a91168329abd36f717b6fc7ea7b2ef60cdea2d /libavformat/rtpenc_mpegts.c
parent199fb40278146c5bb162990c66ad3cd561abc780 (diff)
libavformat: Use ffio_free_dyn_buf where applicable
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtpenc_mpegts.c')
-rw-r--r--libavformat/rtpenc_mpegts.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/libavformat/rtpenc_mpegts.c b/libavformat/rtpenc_mpegts.c
index f170f97934..8ad446b9dd 100644
--- a/libavformat/rtpenc_mpegts.c
+++ b/libavformat/rtpenc_mpegts.c
@@ -21,6 +21,7 @@
#include "libavutil/mathematics.h"
#include "avformat.h"
+#include "avio_internal.h"
struct MuxChain {
AVFormatContext *mpegts_ctx;
@@ -33,11 +34,7 @@ static int rtp_mpegts_write_close(AVFormatContext *s)
if (chain->mpegts_ctx) {
av_write_trailer(chain->mpegts_ctx);
- if (chain->mpegts_ctx->pb) {
- uint8_t *buf;
- avio_close_dyn_buf(chain->mpegts_ctx->pb, &buf);
- av_free(buf);
- }
+ ffio_free_dyn_buf(&chain->mpegts_ctx->pb);
avformat_free_context(chain->mpegts_ctx);
}
if (chain->rtp_ctx) {
@@ -101,11 +98,7 @@ static int rtp_mpegts_write_header(AVFormatContext *s)
fail:
if (mpegts_ctx) {
- if (mpegts_ctx->pb) {
- uint8_t *buf;
- avio_close_dyn_buf(mpegts_ctx->pb, &buf);
- av_free(buf);
- }
+ ffio_free_dyn_buf(&chain->mpegts_ctx->pb);
avformat_free_context(mpegts_ctx);
}
if (rtp_ctx)