aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/nutenc.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/nutenc.c
parent199fb40278146c5bb162990c66ad3cd561abc780 (diff)
downloadffmpeg-8e32b1f0963d01d4f5d4803eb721f162e0d58d9a.tar.gz
libavformat: Use ffio_free_dyn_buf where applicable
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/nutenc.c')
-rw-r--r--libavformat/nutenc.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c
index 3b43954dbd..b7b0c9c790 100644
--- a/libavformat/nutenc.c
+++ b/libavformat/nutenc.c
@@ -616,11 +616,8 @@ static int write_headers(AVFormatContext *avctx, AVIOContext *bc)
return ret;
if (ret > 0)
put_packet(nut, bc, dyn_bc, 1, INFO_STARTCODE);
- else {
- uint8_t *buf;
- avio_close_dyn_buf(dyn_bc, &buf);
- av_free(buf);
- }
+ else
+ ffio_free_dyn_buf(&dyn_bc);
}
for (i = 0; i < nut->avf->nb_chapters; i++) {
@@ -629,9 +626,7 @@ static int write_headers(AVFormatContext *avctx, AVIOContext *bc)
return ret;
ret = write_chapter(nut, dyn_bc, i);
if (ret < 0) {
- uint8_t *buf;
- avio_close_dyn_buf(dyn_bc, &buf);
- av_freep(&buf);
+ ffio_free_dyn_buf(&dyn_bc);
return ret;
}
put_packet(nut, bc, dyn_bc, 1, INFO_STARTCODE);