summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec_svq3.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2015-02-24 13:37:03 +0200
committerMartin Storsjö <martin@martin.st>2015-02-24 23:07:44 +0200
commit199fb40278146c5bb162990c66ad3cd561abc780 (patch)
tree0411eef55863c799202a17254b8cc30e9601d28f /libavformat/rtpdec_svq3.c
parent8a273a746061a112e5e35066a8fd8e146d821a62 (diff)
downloadffmpeg-199fb40278146c5bb162990c66ad3cd561abc780.tar.gz
rtpdec: Use ffio_free_dyn_buf
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtpdec_svq3.c')
-rw-r--r--libavformat/rtpdec_svq3.c13
1 files changed, 3 insertions, 10 deletions
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 <string.h>
#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 = {