diff options
Diffstat (limited to 'libavformat/rtpdec_svq3.c')
-rw-r--r-- | libavformat/rtpdec_svq3.c | 13 |
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 = { |