From 199fb40278146c5bb162990c66ad3cd561abc780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Tue, 24 Feb 2015 13:37:03 +0200 Subject: rtpdec: Use ffio_free_dyn_buf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavformat/rtpdec_svq3.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'libavformat/rtpdec_svq3.c') diff --git a/libavformat/rtpdec_svq3.c b/libavformat/rtpdec_svq3.c index 4667c75cb8..030b379b72 100644 --- a/libavformat/rtpdec_svq3.c +++ b/libavformat/rtpdec_svq3.c @@ -28,6 +28,7 @@ #include #include "libavutil/intreadwrite.h" +#include "avio_internal.h" #include "rtp.h" #include "rtpdec.h" #include "rtpdec_formats.h" @@ -82,11 +83,7 @@ static int svq3_parse_packet (AVFormatContext *s, PayloadContext *sv, if (start_packet) { int res; - if (sv->pktbuf) { - uint8_t *tmp; - avio_close_dyn_buf(sv->pktbuf, &tmp); - av_free(tmp); - } + ffio_free_dyn_buf(&sv->pktbuf); if ((res = avio_open_dyn_buf(&sv->pktbuf)) < 0) return res; sv->timestamp = *timestamp; @@ -111,11 +108,7 @@ static int svq3_parse_packet (AVFormatContext *s, PayloadContext *sv, static void svq3_extradata_free(PayloadContext *sv) { - if (sv->pktbuf) { - uint8_t *buf; - avio_close_dyn_buf(sv->pktbuf, &buf); - av_free(buf); - } + ffio_free_dyn_buf(&sv->pktbuf); } RTPDynamicProtocolHandler ff_svq3_dynamic_handler = { -- cgit v1.2.3