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_asf.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_asf.c')
-rw-r--r-- | libavformat/rtpdec_asf.c | 12 |
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); } |