diff options
author | Martin Storsjö <martin@martin.st> | 2015-02-24 13:37:03 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2015-02-24 23:07:44 +0200 |
commit | 199fb40278146c5bb162990c66ad3cd561abc780 (patch) | |
tree | 0411eef55863c799202a17254b8cc30e9601d28f /libavformat/rtpdec_latm.c | |
parent | 8a273a746061a112e5e35066a8fd8e146d821a62 (diff) | |
download | ffmpeg-199fb40278146c5bb162990c66ad3cd561abc780.tar.gz |
rtpdec: Use ffio_free_dyn_buf
Signed-off-by: Martin Storsjö <martin@martin.st>
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 3ee552e414..81f3ae4c4f 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_free(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) |