diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-02-25 00:40:58 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-02-25 00:42:14 +0100 |
commit | 7d9b06eb179fb0d032c530d21182dce3fe0a7671 (patch) | |
tree | 7be8a4aaa2ed84b83b868f4f636c3a27dfe7b98c /libavformat/rtpdec_latm.c | |
parent | 6e9bbaca6c6739e6524809d3e786ce1e10ad518b (diff) | |
parent | 199fb40278146c5bb162990c66ad3cd561abc780 (diff) | |
download | ffmpeg-7d9b06eb179fb0d032c530d21182dce3fe0a7671.tar.gz |
Merge commit '199fb40278146c5bb162990c66ad3cd561abc780'
* commit '199fb40278146c5bb162990c66ad3cd561abc780':
rtpdec: Use ffio_free_dyn_buf
Conflicts:
libavformat/rtpdec_latm.c
libavformat/rtpdec_svq3.c
libavformat/rtpdec_xiph.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtpdec_latm.c')
-rw-r--r-- | libavformat/rtpdec_latm.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/libavformat/rtpdec_latm.c b/libavformat/rtpdec_latm.c index 2916f6a897..ab425bc080 100644 --- a/libavformat/rtpdec_latm.c +++ b/libavformat/rtpdec_latm.c @@ -19,6 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "avio_internal.h" #include "rtpdec_formats.h" #include "internal.h" #include "libavutil/avstring.h" @@ -33,11 +34,7 @@ struct PayloadContext { static void latm_free_context(PayloadContext *data) { - if (data->dyn_buf) { - uint8_t *p; - avio_close_dyn_buf(data->dyn_buf, &p); - av_free(p); - } + ffio_free_dyn_buf(&data->dyn_buf); av_freep(&data->buf); } @@ -51,10 +48,7 @@ static int latm_parse_packet(AVFormatContext *ctx, PayloadContext *data, if (buf) { if (!data->dyn_buf || data->timestamp != *timestamp) { av_freep(&data->buf); - if (data->dyn_buf) - avio_close_dyn_buf(data->dyn_buf, &data->buf); - data->dyn_buf = NULL; - av_freep(&data->buf); + ffio_free_dyn_buf(&data->dyn_buf); data->timestamp = *timestamp; if ((ret = avio_open_dyn_buf(&data->dyn_buf)) < 0) |