summaryrefslogtreecommitdiff
path: root/libavformat/rtpdec_asf.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/rtpdec_asf.c')
-rw-r--r--libavformat/rtpdec_asf.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/libavformat/rtpdec_asf.c b/libavformat/rtpdec_asf.c
index b0a50353fd..7eb720b3c4 100644
--- a/libavformat/rtpdec_asf.c
+++ b/libavformat/rtpdec_asf.c
@@ -213,10 +213,7 @@ static int asfrtp_parse_packet(AVFormatContext *s, PayloadContext *asf,
* multiple RTP packets.
*/
if (asf->pktbuf && len_off != avio_tell(asf->pktbuf)) {
- uint8_t *p;
- avio_close_dyn_buf(asf->pktbuf, &p);
- asf->pktbuf = NULL;
- av_free(p);
+ ffio_free_dyn_buf(&asf->pktbuf);
}
if (!len_off && !asf->pktbuf &&
(res = avio_open_dyn_buf(&asf->pktbuf)) < 0)
@@ -279,12 +276,7 @@ static int asfrtp_parse_packet(AVFormatContext *s, PayloadContext *asf,
static void asfrtp_free_context(PayloadContext *asf)
{
- if (asf->pktbuf) {
- uint8_t *p = NULL;
- avio_close_dyn_buf(asf->pktbuf, &p);
- asf->pktbuf = NULL;
- av_free(p);
- }
+ ffio_free_dyn_buf(&asf->pktbuf);
av_freep(&asf->buf);
av_free(asf);
}