diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-02-25 00:48:46 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-02-25 00:48:50 +0100 |
commit | 7f03f75ce72fe1c6adfc63f621eeb69cde13769a (patch) | |
tree | 7b20dea793e95c3fe5ab4bccbedd2e83e504f4d3 /libavformat/nutenc.c | |
parent | 7d9b06eb179fb0d032c530d21182dce3fe0a7671 (diff) | |
parent | 8e32b1f0963d01d4f5d4803eb721f162e0d58d9a (diff) | |
download | ffmpeg-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/nutenc.c')
-rw-r--r-- | libavformat/nutenc.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c index c335e6455a..b4b6dcd877 100644 --- a/libavformat/nutenc.c +++ b/libavformat/nutenc.c @@ -666,11 +666,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++) { @@ -679,9 +676,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); |