summaryrefslogtreecommitdiff
path: root/libavformat/rtpenc_mpegts.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-25 00:48:46 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-02-25 00:48:50 +0100
commit7f03f75ce72fe1c6adfc63f621eeb69cde13769a (patch)
tree7b20dea793e95c3fe5ab4bccbedd2e83e504f4d3 /libavformat/rtpenc_mpegts.c
parent7d9b06eb179fb0d032c530d21182dce3fe0a7671 (diff)
parent8e32b1f0963d01d4f5d4803eb721f162e0d58d9a (diff)
downloadffmpeg-7f03f75ce72fe1c6adfc63f621eeb69cde13769a.tar.gz
Merge commit '8e32b1f0963d01d4f5d4803eb721f162e0d58d9a'
* commit '8e32b1f0963d01d4f5d4803eb721f162e0d58d9a': libavformat: Use ffio_free_dyn_buf where applicable Merged-by: Michael Niedermayer <michaelni@gmx.at>
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 e0339bd58d..5b94e73d82 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)